diff --git a/.factorypath b/.factorypath
new file mode 100644
index 0000000000000000000000000000000000000000..64aa78395684cdf667988ff5f0a9d23a40f8ff19
--- /dev/null
+++ b/.factorypath
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..f91fa9371fecdbfdea0875063f0030a632267f54
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+/target/
+/.apt_generated/
+/.apt_generated_tests/
+/.project
+/.classpath
+/.settings
+/org.etsi.osl.tmf.api.iml
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000000000000000000000000000000000..bb7d754baa751630b25598e182a30f062e9b6ebd
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,40 @@
+include:
+ - project: osl/code/org.etsi.osl.main
+ ref: main
+ file:
+ - ci-templates/default.yml
+ - ci-templates/build.yml
+ rules:
+ - if: '$CI_COMMIT_REF_NAME == "main"'
+
+ - project: osl/code/org.etsi.osl.main
+ ref: develop
+ file:
+ - ci-templates/default.yml
+ - ci-templates/build.yml
+ rules:
+ - if: '$CI_COMMIT_REF_NAME == "develop"'
+
+ - project: osl/code/org.etsi.osl.main
+ ref: $CI_COMMIT_REF_NAME
+ file:
+ - ci-templates/default.yml
+ - ci-templates/build.yml
+ rules:
+ - if: '$CI_COMMIT_REF_PROTECTED && $CI_COMMIT_REF_NAME != "main" && $CI_COMMIT_REF_NAME != "develop"'
+
+ - project: osl/code/org.etsi.osl.main
+ ref: develop
+ file:
+ - ci-templates/default.yml
+ - ci-templates/build_unprotected.yml
+ rules:
+ - if: '$CI_COMMIT_REF_NAME != "main" && $CI_COMMIT_REF_NAME != "develop" && !$CI_COMMIT_REF_PROTECTED'
+
+maven_build:
+ extends: .maven_build
+
+docker_build:
+ extends: .docker_build
+ needs:
+ - maven_build
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000000000000000000000000000000000000..e7a7b05cf8fe304860bd076a7163a384075171d4
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,6 @@
+FROM ibm-semeru-runtimes:open-17.0.7_7-jdk
+# RUN mkdir /opt/shareclasses
+RUN mkdir -p /opt/openslice/lib/
+COPY target/org.etsi.osl.tmf.api-1.0.0-exec.jar /opt/openslice/lib/
+CMD ["java", "-Xshareclasses:cacheDir=/opt/shareclasses", "-jar", "/opt/openslice/lib/org.etsi.osl.tmf.api-1.0.0-exec.jar"]
+EXPOSE 13082
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+ 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/README.md b/README.md
index 8f78f76393956fe7b0812491ce1d71aab3e62cdd..0e1a978178b1e4d625912a53fac5106b048e3f53 100644
--- a/README.md
+++ b/README.md
@@ -1,92 +1,3 @@
# org.etsi.osl.tmf.api
-
-
-## Getting started
-
-To make it easy for you to get started with GitLab, here's a list of recommended next steps.
-
-Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
-
-## Add your files
-
-- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
-- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
-
-```
-cd existing_repo
-git remote add origin https://labs.etsi.org/rep/osl/code/org.etsi.osl.tmf.api.git
-git branch -M main
-git push -uf origin main
-```
-
-## Integrate with your tools
-
-- [ ] [Set up project integrations](https://labs.etsi.org/rep/osl/code/org.etsi.osl.tmf.api/-/settings/integrations)
-
-## Collaborate with your team
-
-- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
-- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
-- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
-- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
-- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
-
-## Test and Deploy
-
-Use the built-in continuous integration in GitLab.
-
-- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
-- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
-- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
-- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
-- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
-
-***
-
-# Editing this README
-
-When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
-
-## Suggestions for a good README
-Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
-
-## Name
-Choose a self-explaining name for your project.
-
-## Description
-Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
-
-## Badges
-On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
-
-## Visuals
-Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
-
-## Installation
-Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
-
-## Usage
-Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
-
-## Support
-Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
-
-## Roadmap
-If you have ideas for releases in the future, it is a good idea to list them in the README.
-
-## Contributing
-State if you are open to contributions and what your requirements are for accepting them.
-
-For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
-
-You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
-
-## Authors and acknowledgment
-Show your appreciation to those who have contributed to the project.
-
-## License
-For open source projects, say how it is licensed.
-
-## Project status
-If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
+TMF OpenAPIs implementation.
diff --git a/ci_settings.xml b/ci_settings.xml
new file mode 100644
index 0000000000000000000000000000000000000000..69ad06ed6c63795d191555afde6ea2d1da4e133d
--- /dev/null
+++ b/ci_settings.xml
@@ -0,0 +1,16 @@
+
+
+
+ gitlab-maven
+
+
+
+ Job-Token
+ ${CI_JOB_TOKEN}
+
+
+
+
+
+
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000000000000000000000000000000000000..885c3062d39c252078cdaf8636c69305ec312f2a
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,485 @@
+
+ 4.0.0
+
+ org.etsi.osl
+ org.etsi.osl.main
+ 1.0.0
+ ../org.etsi.osl.main
+
+
+
+ org.etsi.osl.tmf.api
+ org.etsi.osl.tmf.api
+
+
+
+ UTF-8
+ UTF-8
+ ${spring-boot-version}
+ 1.5.3.Final
+ ${springdoc-version}
+ ${springdoc-security-version}
+ ${springdoc-openapiui-version}
+ jdt_apt
+ ${mysql.connector.version}
+ 1.18.28
+
+
+
+
+ gitlab-maven
+ https://labs.etsi.org/rep/api/v4/groups/260/-/packages/maven
+
+
+
+
+ gitlab-maven
+ ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/maven
+
+
+ gitlab-maven
+ ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/maven
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-dependencies
+ ${spring.boot-version}
+ pom
+ import
+
+
+
+ org.apache.camel.springboot
+ camel-spring-boot-dependencies
+ ${camel.version}
+ pom
+ import
+
+
+
+ com.google.guava
+ guava
+ 32.0.0-jre
+
+
+ org.keycloak.bom
+ keycloak-adapter-bom
+ ${keycloak.version}
+ pom
+ import
+
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-data-jpa
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-oauth2-resource-server
+
+
+
+ com.jayway.jsonpath
+ json-path
+
+
+
+
+
+ org.projectlombok
+ lombok
+ provided
+ ${lombok-version}
+
+
+
+ org.keycloak
+ keycloak-spring-boot-starter
+
+
+ org.keycloak
+ keycloak-spring-security-adapter
+
+
+
+ org.keycloak
+ keycloak-admin-client
+ ${keycloak.version}
+
+
+
+ mysql
+ mysql-connector-java
+ runtime
+ ${mysql-connector.version}
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-hibernate5-jakarta
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-activemq
+
+
+ org.apache.activemq
+ activemq-amqp
+ test
+
+
+ org.apache.qpid
+ proton-j
+
+
+
+
+ org.messaginghub
+ pooled-jms
+
+
+
+
+ org.apache.camel.springboot
+ camel-spring-boot-starter
+
+
+ org.apache.activemq
+ activemq-pool
+
+
+ org.apache.camel
+ camel-activemq
+
+
+ org.apache.activemq
+ activemq-broker
+
+
+
+
+ org.apache.camel.springboot
+ camel-service-starter
+
+
+
+ org.apache.camel.springboot
+ camel-http-starter
+
+
+ org.apache.camel
+ camel-jackson
+
+
+ org.apache.camel
+ camel-stream
+
+
+
+
+ org.etsi.osl
+ org.etsi.osl.model.nfv
+ ${org.etsi.osl.model.nfv.version}
+
+
+ org.etsi.osl
+ org.etsi.osl.model.tmf
+ ${org.etsi.osl.model.tmf.version}
+
+
+ org.etsi.osl
+ org.etsi.osl.model.k8s
+ ${org.etsi.osl.model.k8s.version}
+
+
+ org.etsi.osl
+ org.etsi.osl.centrallog.client
+ ${org.etsi.osl.centrallog.client.version}
+
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-ui
+ ${springdoc.version}
+
+
+ org.springdoc
+ springdoc-openapi-ui
+ ${springdoc.openapiui.version}
+
+
+ org.springdoc
+ springdoc-openapi-security
+ ${springdoc.security.version}
+
+
+
+ org.mapstruct
+ mapstruct
+ ${mapstruct.version}
+
+
+ org.mapstruct
+ mapstruct-processor
+ ${mapstruct.version}
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ com.vaadin.external.google
+ android-json
+
+
+
+
+
+ org.springframework.security
+ spring-security-test
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-engine
+ test
+
+
+ org.junit.platform
+ junit-platform-commons
+ test
+
+
+ org.junit.platform
+ junit-platform-runner
+ test
+
+
+ com.h2database
+ h2
+ test
+
+
+ org.apache.activemq
+ activemq-broker
+ test
+
+
+ javax.jms
+ javax.jms-api
+ 2.0.1
+ test
+
+
+ org.json
+ json
+ 20210307
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+ ${java.version}
+
+ -parameters
+
+
+
+ org.mapstruct
+ mapstruct-processor
+ ${mapstruct.version}
+
+
+ org.projectlombok
+ lombok
+ ${lombok-version}
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ ${build-helper-maven-plugin.version}
+
+
+ add-generated-source
+ generate-sources
+
+ add-source
+
+
+
+
+
+
+
+
+
+
+
+ org.codehaus.mojo
+ license-maven-plugin
+ ${maven-license-plugin.version}
+
+ false
+ ========================LICENSE_START=================================
+ =========================LICENSE_END==================================
+ *.json
+
+
+
+ generate-license-headers
+
+ update-file-header
+
+ process-sources
+
+ ${license.licenseName}
+
+
+
+
+ download-licenses
+
+ download-licenses
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring-boot-version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring-boot-version}
+
+ exec
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 3.2.5
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.12
+
+
+
+ prepare-agent
+
+
+
+ report
+ prepare-package
+
+ report
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 3.2.5
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.12
+
+
+
+ prepare-agent
+
+
+
+ report
+ prepare-package
+
+ report
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/java/org/etsi/osl/tmf/BootstrapRepository.java b/src/main/java/org/etsi/osl/tmf/BootstrapRepository.java
new file mode 100644
index 0000000000000000000000000000000000000000..31cc63fd735f194dbf570f77dc2ad9eb402ab9b1
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/BootstrapRepository.java
@@ -0,0 +1,183 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.etsi.osl.tmf.common.model.service.ServiceSpecificationRef;
+import org.etsi.osl.tmf.rcm634.reposervices.ResourceSpecificationRepoService;
+import org.etsi.osl.tmf.scm633.model.ServiceCandidateUpdate;
+import org.etsi.osl.tmf.scm633.model.ServiceCatalog;
+import org.etsi.osl.tmf.scm633.model.ServiceCatalogCreate;
+import org.etsi.osl.tmf.scm633.model.ServiceCategory;
+import org.etsi.osl.tmf.scm633.model.ServiceCategoryCreate;
+import org.etsi.osl.tmf.scm633.model.ServiceCategoryRef;
+import org.etsi.osl.tmf.scm633.model.ServiceSpecification;
+import org.etsi.osl.tmf.scm633.reposervices.CandidateRepoService;
+import org.etsi.osl.tmf.scm633.reposervices.CatalogRepoService;
+import org.etsi.osl.tmf.scm633.reposervices.CategoryRepoService;
+import org.etsi.osl.tmf.scm633.reposervices.ServiceSpecificationRepoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import jakarta.annotation.PostConstruct;
+
+/**
+ * @author ctranoris
+ *
+ */
+@Service
+public class BootstrapRepository {
+
+ private static final transient Log logger = LogFactory.getLog(BootstrapRepository.class.getName());
+
+ private static final boolean ADDGST = true;
+
+ private static final boolean ADDVINNISBT = false;
+
+ private static final String GST_EXAMPLE_NAME = "A GST(NEST) Service Example";
+
+ private static final String VINNI_EXAMPLE_NAME = "A VINNI Service Example";
+
+ @Autowired
+ CatalogRepoService catalogRepoService;
+
+ @Autowired
+ CategoryRepoService categRepoService;
+
+ @Autowired
+ CandidateRepoService candidateRepoService;
+
+ @Autowired
+ ServiceSpecificationRepoService specRepoService;
+
+ @Autowired
+ ResourceSpecificationRepoService resourceSpecRepoService;
+
+
+ @Autowired
+ ObjectMapper objectMapper;
+
+ @PostConstruct
+ @Transactional
+ public void initRepo() {
+ if (this.catalogRepoService.findAll().size() == 0) {
+ ServiceCatalogCreate sc = new ServiceCatalogCreate();
+ sc.setName("Catalog");
+ sc.setDescription("Primary Catalog");
+ sc.setVersion("1.0");
+ ServiceCatalog scatalog = this.catalogRepoService.addCatalog(sc);
+
+ ServiceCategoryCreate scatCreate = new ServiceCategoryCreate();
+ scatCreate.setName("Generic Services");
+ scatCreate.setDescription("Generic Services of this catalog");
+ scatCreate.setVersion("1.0");
+ scatCreate.setIsRoot(true);
+ ServiceCategory scategory = this.categRepoService.addCategory(scatCreate);
+
+ scatalog.getCategoryObj().add(scategory);
+ scatalog = this.catalogRepoService.updateCatalog(scatalog);
+ /**
+ * Add GST
+ */
+ if (ADDGST) {
+ this.createFirstTimeGSTRepo( scategory );
+ }
+ /**
+ * Add VINNI-SB
+ */
+ if (ADDVINNISBT) {
+ this.createFirstTimeVINNISBTRepo( scategory );
+ }
+
+
+ } else { //check if we have the latest version of GST
+ if (ADDGST) {
+ ServiceCategory scategory = this.categRepoService.findByName("Generic Services");
+ ServiceSpecification serviceSpecificationObj = this.specRepoService.findByNameAndVersion( GST_EXAMPLE_NAME , "5.0.0");
+
+ if ( ( scategory != null ) && ( serviceSpecificationObj == null ))
+ {
+ this.createFirstTimeGSTRepo( scategory );
+ }
+ }
+ if (ADDVINNISBT) {
+ ServiceCategory scategory = this.categRepoService.findByName("Generic Services");
+ ServiceSpecification serviceSpecificationObj = this.specRepoService.findByNameAndVersion(VINNI_EXAMPLE_NAME, "0.1.0");
+ if ( ( scategory != null ) && ( serviceSpecificationObj == null ) )
+ {
+ this.createFirstTimeVINNISBTRepo( scategory );
+ }
+ }
+
+
+ }
+ }
+
+
+ @Transactional
+ private void createFirstTimeGSTRepo(ServiceCategory scategory) {
+
+ ServiceSpecification serviceSpecificationObj = this.specRepoService.cloneGSTServiceSpecification( GST_EXAMPLE_NAME);
+ //serviceSpecificationObj = this.specRepoService.updateServiceSpecification( serviceSpecificationObj );
+ serviceSpecificationObj = this.specRepoService.findByUuid( serviceSpecificationObj.getId() );
+
+ ServiceCandidateUpdate scand = new ServiceCandidateUpdate();
+ ServiceSpecificationRef serviceSpecificationRef = new ServiceSpecificationRef();
+ serviceSpecificationRef.setId(serviceSpecificationObj.getId());
+ ServiceCategoryRef categoryItem = new ServiceCategoryRef();
+ categoryItem.setId(scategory.getId());
+ scand.addCategoryItem(categoryItem);
+ scand.setServiceSpecification(serviceSpecificationRef);
+
+ this.candidateRepoService.updateCandidate(
+ serviceSpecificationObj.getServiceCandidateObjId() ,
+ scand);
+
+ }
+
+
+ @Transactional
+ public void createFirstTimeVINNISBTRepo( ServiceCategory scategory ) {
+
+ ServiceSpecification serviceSpecVinniSB = this.specRepoService.cloneVINNIServiceSpecification( VINNI_EXAMPLE_NAME, true, true, true, true, true, true, true, true, true, true);
+
+
+ /**
+ * add VINNI-SB Service Spec to Catalog
+ */
+
+
+ ServiceCandidateUpdate scand = new ServiceCandidateUpdate();
+ ServiceSpecificationRef serviceSpecificationRef = new ServiceSpecificationRef();
+ serviceSpecificationRef.setId(serviceSpecVinniSB.getId());
+ ServiceCategoryRef categoryItem = new ServiceCategoryRef();
+ categoryItem.setId(scategory.getId());
+ scand.addCategoryItem(categoryItem);
+ scand.setServiceSpecification(serviceSpecificationRef);
+
+ this.candidateRepoService.updateCandidate(
+ serviceSpecVinniSB.getServiceCandidateObjId(),
+ scand);
+ }
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/BootstrapResources.java b/src/main/java/org/etsi/osl/tmf/BootstrapResources.java
new file mode 100644
index 0000000000000000000000000000000000000000..dacfb02b6c0f9c82d758949409ef662b163cadaf
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/BootstrapResources.java
@@ -0,0 +1,288 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.etsi.osl.domain.model.kubernetes.KubernetesCRDV1;
+import org.etsi.osl.domain.model.kubernetes.KubernetesCRV1;
+import org.etsi.osl.domain.model.kubernetes.KubernetesContextDefinition;
+import org.etsi.osl.domain.model.kubernetes.KubernetesSecret;
+import org.etsi.osl.tmf.rcm634.model.ResourceCandidateUpdate;
+import org.etsi.osl.tmf.rcm634.model.ResourceCatalog;
+import org.etsi.osl.tmf.rcm634.model.ResourceCatalogCreate;
+import org.etsi.osl.tmf.rcm634.model.ResourceCategory;
+import org.etsi.osl.tmf.rcm634.model.ResourceCategoryCreate;
+import org.etsi.osl.tmf.rcm634.model.ResourceCategoryRef;
+import org.etsi.osl.tmf.rcm634.model.ResourceSpecification;
+import org.etsi.osl.tmf.rcm634.model.ResourceSpecificationCreate;
+import org.etsi.osl.tmf.rcm634.model.ResourceSpecificationRef;
+import org.etsi.osl.tmf.rcm634.repo.ResourceCatalogRepository;
+import org.etsi.osl.tmf.rcm634.repo.ResourceSpecificationRepository;
+import org.etsi.osl.tmf.rcm634.reposervices.ResourceCandidateRepoService;
+import org.etsi.osl.tmf.rcm634.reposervices.ResourceCatalogRepoService;
+import org.etsi.osl.tmf.rcm634.reposervices.ResourceCategoryRepoService;
+import org.etsi.osl.tmf.rcm634.reposervices.ResourceSpecificationRepoService;
+import org.etsi.osl.tmf.ri639.reposervices.ResourceRepoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import jakarta.annotation.PostConstruct;
+
+@Service
+public class BootstrapResources {
+
+ @Autowired
+ ResourceCatalogRepoService resourceCatalogRepoService;
+
+ @Autowired
+ ResourceCategoryRepoService resourceCategRepoService;
+
+ @Autowired
+ ResourceCandidateRepoService resourceCandidateRepoService;
+
+ @Autowired
+ ResourceSpecificationRepoService resourceSpecRepoService;
+
+ @Autowired
+ ResourceRepoService resourceRepoService;
+
+ @Autowired
+ ResourceCatalogRepository resourceCatalogRepository;
+
+ @Autowired
+ ResourceSpecificationRepository resourceSpecificationRepo;
+
+ @Autowired
+ ObjectMapper objectMapper;
+
+
+ private static final String OSM_TENANT = "osm-tenant.openslice.io";
+
+ private static final String VIM_ACCOUNT = "vim-account.openslice.io.json";
+
+ private static final String GNB_TENANT = "gnodeb.openslice.io";
+
+
+ private static final String INFRA_RESOURCES = "Infrastructure Resources";
+
+ private static final String NETWORK_RESOURCES = "Network Resources";
+
+
+
+ @PostConstruct
+ @Transactional
+ public void initRepo() {
+
+ ResourceCatalog scatalog = this.resourceCatalogRepoService.findByName( "Catalog" );
+ if ( scatalog == null) {
+
+ //Create a new ResourceCatalogCreate named Catalog
+ ResourceCatalogCreate sc = new ResourceCatalogCreate();
+ sc.setName("Catalog");
+ sc.setDescription("Primary Resource Catalog");
+ sc.setVersion("1.0");
+ //Turns ResourceCatalogCreate to a ResourceCatalog with the same attributes set at the ResourceCatalogCreate
+ scatalog = this.resourceCatalogRepoService.addCatalog(sc);
+
+ // Create a new ResourceCategoryCreate named Generic Resources
+ ResourceCategoryCreate scatCreate = new ResourceCategoryCreate();
+ scatCreate.setName("Generic Resources");
+ scatCreate.setDescription("Generic Resources of this catalog");
+ scatCreate.setVersion("1.0");
+ scatCreate.setIsRoot(true);
+
+ ResourceCategory scategory = this.resourceCategRepoService.addCategory(scatCreate);
+ //Adds the ResourceCategory to the Primary Resource Catalog and then saves it to the resourceCatalogRepository
+ //scatalog.getCategoryObj().add(scategory);
+// ResourceCategoryRef catref = new ResourceCategoryRef();
+// catref.setId( scategory.getId() );
+// catref.setName( scategory.getName());
+ scatalog.addCategory(scategory);
+ }
+
+ ResourceCategory scategoryNetw = this.resourceCategRepoService.findByName(NETWORK_RESOURCES );
+ if ( scategoryNetw == null ){
+ ResourceCategoryCreate scategoryNetwCreate = new ResourceCategoryCreate();
+ scategoryNetwCreate.setName(NETWORK_RESOURCES);
+ scategoryNetwCreate.setDescription("Network Resources on this catalog");
+ scategoryNetwCreate.setVersion("1.0");
+ scategoryNetwCreate.setIsRoot(true);
+ // Turns ResourceCategoryCreate to a ResourceCategory with the same attributes set at the ResourceCategoryCreate
+ scategoryNetw = this.resourceCategRepoService.addCategory( scategoryNetwCreate );
+ //Adds the ResourceCategory to the Primary Resource Catalog and then saves it to the resourceCatalogRepository
+// ResourceCategoryRef catref = new ResourceCategoryRef();
+// catref.setId( scategoryNetw.getId() );
+// catref.setName( scategoryNetw.getName());
+ scatalog.addCategory( scategoryNetw );
+ }
+
+ ResourceCategory scategoryInfra = this.resourceCategRepoService.findByName(INFRA_RESOURCES );
+ if ( scategoryInfra == null ){
+ ResourceCategoryCreate scategoryInfraCreate = new ResourceCategoryCreate();
+ scategoryInfraCreate.setName( INFRA_RESOURCES );
+ scategoryInfraCreate.setDescription("Infrastructure Resources on this catalog");
+ scategoryInfraCreate.setVersion("1.0");
+ scategoryInfraCreate.setIsRoot(true);
+ scategoryInfra = this.resourceCategRepoService.addCategory( scategoryInfraCreate );
+// ResourceCategoryRef catref = new ResourceCategoryRef();
+// catref.setId( scategoryInfra.getId() );
+// catref.setName( scategoryInfra.getName());
+ scatalog.addCategory( scategoryInfra );
+ }
+
+ scatalog = this.resourceCatalogRepoService.updateCatalog( scatalog );
+
+
+ ResourceSpecification resourceSpecificationObj = this.resourceSpecRepoService.findByNameAndVersion( VIM_ACCOUNT , "0.2.0");
+ if ( ( resourceSpecificationObj == null ))
+ {
+ this.createBootResourceSpec( scategoryNetw, VIM_ACCOUNT , "vim-account.openslice.io.json" );
+ }
+
+ resourceSpecificationObj = this.resourceSpecRepoService.findByNameAndVersion( OSM_TENANT , "0.2.0");
+ if ( ( resourceSpecificationObj == null ))
+ {
+ this.createBootResourceSpec( scategoryNetw, OSM_TENANT , "osm-tenant.openslice.io.json" );
+ }
+ resourceSpecificationObj = this.resourceSpecRepoService.findByNameAndVersion( GNB_TENANT , "0.2.0");
+ if ( ( resourceSpecificationObj == null ))
+ {
+ this.createBootPhysicalResourceSpec( scategoryNetw,GNB_TENANT, "gnodeb.openslice.io.json");
+ }
+
+
+
+
+ resourceSpecificationObj = this.resourceSpecRepoService.findByNameAndVersion(
+ KubernetesContextDefinition.OSL_KUBD_RSPEC_NAME ,
+ KubernetesContextDefinition.OSL_KUBD_RSPEC_VERSION);
+
+ if ( ( scategoryInfra != null ) && ( resourceSpecificationObj == null ))
+ {
+ ResourceSpecification resourceSpecificationKubernetes =
+ this.resourceSpecRepoService.addResourceSpecification( KubernetesContextDefinition.builder().build().toRSpecCreate_InitRepo() );
+ //KubernetesContextDefinition.builder().build().fromRSpec(resourceSpecificationKubernetes);//to update any details
+ this.addToCategory( scategoryInfra, resourceSpecificationKubernetes );
+ }
+
+ resourceSpecificationObj = this.resourceSpecRepoService.findByNameAndVersion(
+ KubernetesCRDV1.OSL_KUBCRD_RSPEC_NAME ,
+ KubernetesCRDV1.OSL_KUBCRD_RSPEC_VERSION);
+
+ if ( ( scategoryInfra != null ) && ( resourceSpecificationObj == null ))
+ {
+ ResourceSpecification resourceSpecificationKubernetesCRD =
+ this.resourceSpecRepoService.addResourceSpecification( KubernetesCRDV1.builder().build().toRSpecCreate_InitRepo() );
+ KubernetesCRDV1.builder().build().fromRSpec(resourceSpecificationKubernetesCRD);//to update any details
+ this.addToCategory( scategoryInfra, resourceSpecificationKubernetesCRD );
+ }
+
+
+ resourceSpecificationObj = this.resourceSpecRepoService.findByNameAndVersion(
+ KubernetesCRV1.OSL_KUBCRV1_RSPEC_NAME ,
+ KubernetesCRV1.OSL_KUBCRV1_RSPEC_VERSION);
+
+ if ( ( scategoryInfra != null ) && ( resourceSpecificationObj == null ))
+ {
+ ResourceSpecification rspecKubCRV1 =
+ this.resourceSpecRepoService.addResourceSpecification( KubernetesCRV1.builder().build().toRSpecCreate_InitRepo() );
+ KubernetesCRV1.builder().build().fromRSpec(rspecKubCRV1);//to update any details
+ this.addToCategory( scategoryInfra, rspecKubCRV1 );
+ }
+
+ resourceSpecificationObj = this.resourceSpecRepoService.findByNameAndVersion(
+ KubernetesSecret.OSL_KUBSECRET_RSPEC_NAME ,
+ KubernetesSecret.OSL_KUBSECRET_RSPEC_VERSION);
+
+ if ( ( scategoryInfra != null ) && ( resourceSpecificationObj == null ))
+ {
+ ResourceSpecification rspecKubSecret =
+ this.resourceSpecRepoService.addResourceSpecification( KubernetesSecret.builder().build().toRSpecCreate_InitRepo() );
+ KubernetesSecret.builder().build().fromRSpec(rspecKubSecret);//to update any details
+ this.addToCategory( scategoryInfra, rspecKubSecret );
+ }
+
+
+
+ }
+
+
+ private void createBootResourceSpec( ResourceCategory scategory, String aname, String afile) {
+
+ ResourceSpecificationCreate rsc = this.resourceSpecRepoService.readFromLocalLogicalResourceSpec( afile );
+ rsc.setName( aname );
+ ResourceSpecification resourceSpecificationObj = this.resourceSpecRepoService.addResourceSpecification( rsc );
+
+ addToCategory(scategory, resourceSpecificationObj);
+
+ }
+
+ private void addToCategory(ResourceCategory scategory, ResourceSpecification resourceSpecificationObj) {
+
+ //Turn the ResourceSpecification to a ResourceCanditate to save it to the ResourceCatalogRepo
+ ResourceCandidateUpdate scand = new ResourceCandidateUpdate();
+ scand.setName( resourceSpecificationObj.getName());
+ ResourceSpecificationRef resSpecificationRef = new ResourceSpecificationRef();
+ resSpecificationRef.setId(resourceSpecificationObj.getId());
+ resSpecificationRef.setName(resourceSpecificationObj.getName());
+ scand.resourceSpecification(resSpecificationRef);
+ ResourceCategoryRef categoryItem = new ResourceCategoryRef();
+ categoryItem.setId(scategory.getId());
+ scand.addCategoryItem(categoryItem);
+
+ this.resourceCandidateRepoService.updateCandidate(resourceSpecificationObj.getResourceCandidateObjId() , scand);
+ }
+
+ private void createBootPhysicalResourceSpec( ResourceCategory scategory, String aname, String afile) {
+ //Find the MANO Provider Spec, get its href and use it to create a dependency with the VIM
+
+ ResourceSpecification resourceSpecificationObj = this.resourceSpecRepoService.clonePhysicalResourceSpec( aname , afile);
+ resourceSpecificationObj = resourceSpecificationRepo.save(resourceSpecificationObj);
+
+ //Turn the ResourceSpecification to a ResourceCanditate to save it to the ResourceCatalogRepo
+ ResourceCandidateUpdate scand = new ResourceCandidateUpdate();
+ scand.setName( resourceSpecificationObj.getName());
+ ResourceSpecificationRef resSpecificationRef = new ResourceSpecificationRef();
+ resSpecificationRef.setId(resourceSpecificationObj.getId());
+ resSpecificationRef.setName(resourceSpecificationObj.getName());
+ scand.resourceSpecification(resSpecificationRef);
+ ResourceCategoryRef categoryItem = new ResourceCategoryRef();
+ categoryItem.setId(scategory.getId());
+ scand.addCategoryItem(categoryItem);
+
+ this.resourceCandidateRepoService.updateCandidate(resourceSpecificationObj.getResourceCandidateObjId() , scand);
+ }
+
+
+
+ public ResourceSpecification demoResourceSpecification() {
+
+ ResourceSpecificationCreate spec = new ResourceSpecificationCreate();
+ spec.setName("Example Logical Resource");
+ spec.setVersion("1.0.0");
+
+ return this.resourceSpecRepoService.addLogicalResourceSpecification(spec);
+ }
+
+
+
+}
+
+
diff --git a/src/main/java/org/etsi/osl/tmf/JsonUtils.java b/src/main/java/org/etsi/osl/tmf/JsonUtils.java
new file mode 100644
index 0000000000000000000000000000000000000000..b28edd691ad5bafaa90b8c41454b85aaf8a5a122
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/JsonUtils.java
@@ -0,0 +1,55 @@
+package org.etsi.osl.tmf;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
+
+/**
+ * @author ctranoris
+ *
+ */
+public class JsonUtils {
+
+ public static byte[] toJson(Object object) throws IOException {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+ mapper.registerModule(new JavaTimeModule());
+ return mapper.writeValueAsBytes(object);
+ }
+
+ public static String toJsonString(Object object) throws IOException {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+ mapper.registerModule(new JavaTimeModule());
+ return mapper.writeValueAsString(object);
+ }
+
+ public static T toJsonObj(String content, Class valueType) throws IOException {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+ mapper.registerModule(new JavaTimeModule());
+ return mapper.readValue(content, valueType);
+ }
+
+ public static T toJsonObj(InputStream content, Class valueType) throws IOException {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+ mapper.registerModule(new JavaTimeModule());
+ return mapper.readValue(content, valueType);
+ }
+
+ public static List toListOfJsonObj(String content, Class valueType) throws IOException {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+ List listOfJsonObj = mapper.readValue(
+ content,
+ mapper.getTypeFactory().constructCollectionType(
+ List.class, valueType));
+ return listOfJsonObj;
+ }
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/LocalMysqlDialect.java b/src/main/java/org/etsi/osl/tmf/LocalMysqlDialect.java
new file mode 100644
index 0000000000000000000000000000000000000000..9220b97d37b9d9ba89da308bd334939c6e40e254
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/LocalMysqlDialect.java
@@ -0,0 +1,29 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf;
+
+import org.hibernate.dialect.MySQLDialect; ;
+
+public class LocalMysqlDialect extends MySQLDialect {
+ @Override
+ public String getTableTypeString() {
+ return " DEFAULT CHARSET=utf8";
+ }
+}
diff --git a/src/main/java/org/etsi/osl/tmf/MvcConfig.java b/src/main/java/org/etsi/osl/tmf/MvcConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..bb104c659dd4f754aa8fc7792aad7ec999b71051
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/MvcConfig.java
@@ -0,0 +1,129 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf;
+
+import java.io.File;
+import java.io.IOException;
+import java.time.LocalDateTime;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.List;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
+import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
+import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.env.Environment;
+import org.springframework.http.converter.ByteArrayHttpMessageConverter;
+import org.springframework.http.converter.HttpMessageConverter;
+import org.springframework.http.converter.StringHttpMessageConverter;
+import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+import org.springframework.web.servlet.resource.EncodedResourceResolver;
+import org.springframework.web.servlet.resource.PathResourceResolver;
+
+@Configuration
+//@EnableWebMvc - removed 30/7/2021
+public class MvcConfig implements WebMvcConfigurer {
+ @Autowired
+ Environment env;
+
+ public MvcConfig() {
+ super();
+ }
+
+ @Override
+ public void addViewControllers(final ViewControllerRegistry registry) {
+ registry.addViewController("/index.html");
+
+ }
+
+ @Override
+ public void addResourceHandlers(ResourceHandlerRegistry registry) {
+ // registry.addResourceHandler("/testweb/**").addResourceLocations("file:///C:/Users/ctranoris/git/org.etsi.osl.portal.web/src/").setCachePeriod(0);
+ String a = (new File("../org.etsi.osl.tmf.web/dist/io-openslice-portal-web/")).getAbsoluteFile().toURI().toString();
+ System.out.println("======================> " + a);
+ registry.addResourceHandler("/services/**").addResourceLocations(a) // "file:///./../org.etsi.osl.portal.web/src/")
+ .setCachePeriod(0).resourceChain(true).addResolver(new EncodedResourceResolver())
+ .addResolver(new PathResourceResolver());
+
+// registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");
+//
+// registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
+
+ }
+
+ @Override
+ public void extendMessageConverters(List> converters) {
+ // DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd
+ // HH:mm:ss");
+ DateTimeFormatter formatter = DateTimeFormatter.ISO_ZONED_DATE_TIME;
+ LocalDateTimeSerializer localDateTimeSerializer = new LocalDateTimeSerializer(formatter);
+ LocalDateTimeDeserializer localDateTimeDeserializer = new LocalDateTimeDeserializer(formatter);
+
+ JavaTimeModule module = new JavaTimeModule();
+ module.addSerializer(LocalDateTime.class, localDateTimeSerializer);
+ module.addDeserializer(LocalDateTime.class, localDateTimeDeserializer);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.registerModule(module);
+
+ SimpleModule simpleModule = new SimpleModule();
+ simpleModule.addSerializer(OffsetDateTime.class, new JsonSerializer() {
+ @Override
+ public void serialize(OffsetDateTime offsetDateTime, JsonGenerator jsonGenerator,
+ SerializerProvider serializerProvider) throws IOException, JsonProcessingException {
+ jsonGenerator.writeString(DateTimeFormatter.ISO_ZONED_DATE_TIME.format(offsetDateTime));
+
+ }
+ });
+
+
+
+
+ mapper.registerModule(simpleModule);
+
+ // add converter at the very front
+ // if there are same type mappers in converters, setting in first mapper
+ // is used.
+ converters.add(new MappingJackson2HttpMessageConverter(mapper));
+
+
+
+ }
+
+ @Override
+ public void configureMessageConverters(List> converters) {
+ converters.add(new StringHttpMessageConverter());
+ converters.add(new ByteArrayHttpMessageConverter());
+ }
+
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/OpenAPISpringBoot.java b/src/main/java/org/etsi/osl/tmf/OpenAPISpringBoot.java
new file mode 100644
index 0000000000000000000000000000000000000000..f42df109cbb8db78fdbdbebd9131589bb6cd10d7
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/OpenAPISpringBoot.java
@@ -0,0 +1,87 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf;
+
+import org.springframework.boot.CommandLineRunner;
+import org.springframework.boot.ExitCodeGenerator;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.domain.EntityScan;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.ComponentScan;
+
+
+/**
+ * For implementing the callback and events, it might be useful to check the DDD pattern: https://www.baeldung.com/spring-data-ddd
+ *
+ *
+ * @author ctranoris
+ *
+ */
+@SpringBootApplication
+@ComponentScan( basePackages = {
+ "org.etsi.osl",
+ "org.etsi.osl.centrallog"
+ } )
+@EntityScan( basePackages = {
+ "org.etsi.osl",
+ "org.etsi.osl.sd",
+ "org.etsi.osl.sd.model",
+ "org.etsi.osl.tmf",
+ "org.etsi.osl.tmf.configuration",
+ "org.etsi.osl.tmf.scm633",
+ "org.etsi.osl.tmf.scm633.api",
+ "org.etsi.osl.tmf.scm633.repo",
+ "org.etsi.osl.tmf.scm633.reposervices",
+ "org.etsi.osl.tmf.scm634",
+ "org.etsi.osl.tmf.scm634.api",
+ "org.etsi.osl.centrallog.client"} )
+
+public class OpenAPISpringBoot implements CommandLineRunner {
+
+ private static ApplicationContext applicationContext;
+
+ @Override
+ public void run(String... arg0) throws Exception {
+ if (arg0.length > 0 && arg0[0].equals("exitcode")) {
+ throw new ExitException();
+ }
+ }
+
+ public static void main(String[] args) throws Exception {
+
+ applicationContext = new SpringApplication(OpenAPISpringBoot.class).run(args);
+
+// for (String beanName : applicationContext.getBeanDefinitionNames()) {
+// System.out.println(beanName);
+// }
+ }
+
+ class ExitException extends RuntimeException implements ExitCodeGenerator {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public int getExitCode() {
+ return 10;
+ }
+
+ }
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/AckAlarmsApi.java b/src/main/java/org/etsi/osl/tmf/am642/api/AckAlarmsApi.java
new file mode 100644
index 0000000000000000000000000000000000000000..75edd445b5523bf87d5e7d4ba1f3d5c574de5a4c
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/AckAlarmsApi.java
@@ -0,0 +1,165 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+/**
+ * NOTE: This class is auto generated by the swagger code generator program (3.0.19).
+ * https://github.com/swagger-api/swagger-codegen
+ * Do not edit the class manually.
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.etsi.osl.tmf.am642.model.AckAlarms;
+import org.etsi.osl.tmf.am642.model.AckAlarmsCreate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.Valid;
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+@Tag(name = "ackAlarms", description = "the ackAlarms API")
+public interface AckAlarmsApi {
+
+ Logger log = LoggerFactory.getLogger(AckAlarmsApi.class);
+
+ default Optional getObjectMapper(){
+ return Optional.empty();
+ }
+
+ default Optional getRequest(){
+ return Optional.empty();
+ }
+
+ default Optional getAcceptHeader() {
+ return getRequest().map(r -> r.getHeader("Accept"));
+ }
+
+ @Operation(summary = "Creates a AckAlarms", operationId = "createAckAlarms", description = "This operation creates a AckAlarms entity.", tags={ "ackAlarms", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Created"),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/ackAlarms",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity createAckAlarms(@Parameter(description = "The AckAlarms to be created" ,required=true ) @Valid @RequestBody AckAlarmsCreate body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"ackedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"ackTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"ackUserId\" : \"ackUserId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"alarmPattern\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@type\" : \"@type\",\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n}", AckAlarms.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default AckAlarmsApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "List or find AckAlarms objects", operationId = "listAckAlarms", description = "This operation list or find AckAlarms entities" , tags={ "ackAlarms", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode ="200", description = "Success" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/ackAlarms",
+ produces = { "application/json;charset=utf-8" },
+ method = RequestMethod.GET)
+ default ResponseEntity> listAckAlarms(@Parameter(description = "Comma-separated properties to be provided in response") @Valid @RequestParam(value = "fields", required = false) String fields
+,@Parameter(description = "Requested index for start of resources to be provided in response") @Valid @RequestParam(value = "offset", required = false) Integer offset
+,@Parameter(description = "Requested number of resources to be provided in response") @Valid @RequestParam(value = "limit", required = false) Integer limit,
+Map allParams
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("[ {\r\n \"ackedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"ackTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"ackUserId\" : \"ackUserId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"alarmPattern\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@type\" : \"@type\",\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n}, {\r\n \"ackedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"ackTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"ackUserId\" : \"ackUserId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"alarmPattern\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@type\" : \"@type\",\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default AckAlarmsApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Retrieves a AckAlarms by ID", operationId = "retrieveAckAlarms", description = "This operation retrieves a AckAlarms entity. Attribute selection is enabled for all first level attributes.", tags={ "ackAlarms", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode ="200", description = "Success"),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/ackAlarms/{id}",
+ produces = { "application/json;charset=utf-8" },
+ method = RequestMethod.GET)
+ default ResponseEntity retrieveAckAlarms(@Parameter(description = "Identifier of the AckAlarms",required=true) @PathVariable("id") String id
+,@Parameter(description = "Comma-separated properties to provide in response") @Valid @RequestParam(value = "fields", required = false) String fields
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"ackedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"ackTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"ackUserId\" : \"ackUserId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"alarmPattern\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@type\" : \"@type\",\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n}", AckAlarms.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default AckAlarmsApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/AckAlarmsApiController.java b/src/main/java/org/etsi/osl/tmf/am642/api/AckAlarmsApiController.java
new file mode 100644
index 0000000000000000000000000000000000000000..a84959eb3dcb73c89d32fb997112ec07308eba84
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/AckAlarmsApiController.java
@@ -0,0 +1,130 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.etsi.osl.tmf.am642.model.AckAlarms;
+import org.etsi.osl.tmf.am642.model.AckAlarmsCreate;
+import org.etsi.osl.tmf.am642.reposervices.AckAlarmsRepoService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.Valid;
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+@Controller
+@RequestMapping("/alarmManagement/v4/")
+public class AckAlarmsApiController implements AckAlarmsApi {
+
+ private final ObjectMapper objectMapper;
+
+ private final HttpServletRequest request;
+ private static final Logger log = LoggerFactory.getLogger(AckAlarmsApiController.class);
+
+ @org.springframework.beans.factory.annotation.Autowired
+ public AckAlarmsApiController(ObjectMapper objectMapper, HttpServletRequest request) {
+ this.objectMapper = objectMapper;
+ this.request = request;
+ }
+
+
+ @Autowired
+ AckAlarmsRepoService ackAlarmRepoService;
+
+ @Override
+ public Optional getObjectMapper() {
+ return Optional.ofNullable(objectMapper);
+ }
+
+ @Override
+ public Optional getRequest() {
+ return Optional.ofNullable(request);
+ }
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity createAckAlarms(@Valid AckAlarmsCreate body) {
+ try {
+
+ AckAlarms c = ackAlarmRepoService.addAckAlarm( body );
+
+ return new ResponseEntity(c, HttpStatus.OK);
+ } catch (Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity> listAckAlarms(@Valid String fields, @Valid Integer offset,
+ @Valid Integer limit, Map allParams) {
+ try {
+ if (allParams != null) {
+ allParams.remove("fields");
+ allParams.remove("offset");
+ allParams.remove("limit");
+ } else {
+ allParams = new HashMap<>();
+ }
+ if ((fields == null) && (allParams.size() == 0)) {
+
+ String myfields = "lastUpdate,lifecycleStatus";
+ return new ResponseEntity>(
+ ackAlarmRepoService.findAll( myfields, allParams), HttpStatus.OK);
+
+
+ } else {
+
+
+ return new ResponseEntity>(
+ ackAlarmRepoService.findAll(fields, allParams), HttpStatus.OK);
+ }
+
+ } catch (Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity retrieveAckAlarms(String id, @Valid String fields) {
+ try {
+
+ return new ResponseEntity( ackAlarmRepoService.findById( id ), HttpStatus.OK);
+ } catch ( Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/AlarmApi.java b/src/main/java/org/etsi/osl/tmf/am642/api/AlarmApi.java
new file mode 100644
index 0000000000000000000000000000000000000000..0c518aef511bf67ffd5909c044343d5870fba094
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/AlarmApi.java
@@ -0,0 +1,222 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+/**
+ * NOTE: This class is auto generated by the swagger code generator program (3.0.19).
+ * https://github.com/swagger-api/swagger-codegen
+ * Do not edit the class manually.
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.etsi.osl.tmf.am642.model.Alarm;
+import org.etsi.osl.tmf.am642.model.AlarmCreate;
+import org.etsi.osl.tmf.am642.model.AlarmUpdate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.Valid;
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+@Tag(name = "alarm", description = "the alarm API")
+public interface AlarmApi {
+
+ Logger log = LoggerFactory.getLogger(AlarmApi.class);
+
+ default Optional getObjectMapper(){
+ return Optional.empty();
+ }
+
+ default Optional getRequest(){
+ return Optional.empty();
+ }
+
+ default Optional getAcceptHeader() {
+ return getRequest().map(r -> r.getHeader("Accept"));
+ }
+
+ @Operation(summary = "Creates a Alarm", operationId = "createAlarm", description = "This operation creates a Alarm entity.", tags={ "alarm", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Created" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/alarm",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity createAlarm(@Parameter(description = "The Alarm to be created" ,required=true ) @Valid @RequestBody AlarmCreate body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n}", Alarm.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default AlarmApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Deletes a Alarm", operationId = "deleteAlarm", description = "This operation deletes a Alarm entity.", tags={ "alarm", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "204", description = "Deleted" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/alarm/{id}",
+ produces = { "application/json;charset=utf-8" },
+ method = RequestMethod.DELETE)
+ default ResponseEntity deleteAlarm(@Parameter(description = "Identifier of the Alarm",required=true) @PathVariable("id") String id
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default AlarmApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "List or find Alarm objects", operationId = "listAlarm", description = "This operation list or find Alarm entities" , tags={ "alarm", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode ="200", description = "Success" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/alarm",
+ produces = { "application/json;charset=utf-8" },
+ method = RequestMethod.GET)
+ default ResponseEntity> listAlarm(@Parameter(description = "Comma-separated properties to be provided in response") @Valid @RequestParam(value = "fields", required = false) String fields
+,@Parameter(description = "Requested index for start of resources to be provided in response") @Valid @RequestParam(value = "offset", required = false) Integer offset
+,@Parameter(description = "Requested number of resources to be provided in response") @Valid @RequestParam(value = "limit", required = false) Integer limit,
+@Parameter(hidden = true) @Valid @RequestParam Map allParams
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("[ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n}, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default AlarmApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Updates partially a Alarm", operationId = "patchAlarm", description = "This operation updates partially a Alarm entity.", tags={ "alarm", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode ="200", description = "Updated" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/alarm/{id}",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.PATCH)
+ default ResponseEntity patchAlarm(@Parameter(description = "The Alarm to be updated" ,required=true ) @Valid @RequestBody AlarmUpdate body
+,@Parameter(description = "Identifier of the Alarm",required=true) @PathVariable("id") String id
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n}", Alarm.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default AlarmApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Retrieves a Alarm by ID", operationId = "retrieveAlarm", description = "This operation retrieves a Alarm entity. Attribute selection is enabled for all first level attributes.", tags={ "alarm", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode ="200", description = "Success" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/alarm/{id}",
+ produces = { "application/json;charset=utf-8" },
+ method = RequestMethod.GET)
+ default ResponseEntity retrieveAlarm(@Parameter(description = "Identifier of the Alarm",required=true) @PathVariable("id") String id
+,@Parameter(description = "Comma-separated properties to provide in response") @Valid @RequestParam(value = "fields", required = false) String fields
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n}", Alarm.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default AlarmApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/AlarmApiController.java b/src/main/java/org/etsi/osl/tmf/am642/api/AlarmApiController.java
new file mode 100644
index 0000000000000000000000000000000000000000..f82067c35d138ff316894bd47add776e5e78bc86
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/AlarmApiController.java
@@ -0,0 +1,152 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.etsi.osl.tmf.am642.model.Alarm;
+import org.etsi.osl.tmf.am642.model.AlarmCreate;
+import org.etsi.osl.tmf.am642.model.AlarmUpdate;
+import org.etsi.osl.tmf.am642.reposervices.AlarmRepoService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.Valid;
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+@Controller
+@RequestMapping("/alarmManagement/v4/")
+
+public class AlarmApiController implements AlarmApi {
+
+ private final ObjectMapper objectMapper;
+
+ private final HttpServletRequest request;
+
+
+ private static final Logger log = LoggerFactory.getLogger(AlarmApiController.class);
+
+ @Autowired
+ AlarmRepoService alarmRepoService;
+
+ @org.springframework.beans.factory.annotation.Autowired
+ public AlarmApiController(ObjectMapper objectMapper, HttpServletRequest request) {
+ this.objectMapper = objectMapper;
+ this.request = request;
+ }
+
+ @Override
+ public Optional getObjectMapper() {
+ return Optional.ofNullable(objectMapper);
+ }
+
+ @Override
+ public Optional getRequest() {
+ return Optional.ofNullable(request);
+ }
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity createAlarm(@Valid AlarmCreate body) {
+ try {
+
+ Alarm c = alarmRepoService.addAlarm( body );
+
+ return new ResponseEntity(c, HttpStatus.OK);
+ } catch (Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity deleteAlarm(String id) {
+ try {
+
+ return new ResponseEntity( alarmRepoService.deleteById( id ), HttpStatus.OK);
+ } catch ( Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity> listAlarm(@Valid String fields, @Valid Integer offset, @Valid Integer limit,
+ Map allParams) {
+ try {
+ if (allParams != null) {
+ allParams.remove("fields");
+ allParams.remove("offset");
+ allParams.remove("limit");
+ } else {
+ allParams = new HashMap<>();
+ }
+ if ((fields == null) && (allParams.size() == 0)) {
+
+ String myfields = null;
+ return new ResponseEntity>(
+ alarmRepoService.findAll( myfields, allParams), HttpStatus.OK);
+
+
+ } else {
+
+
+ return new ResponseEntity>(
+ alarmRepoService.findAll(fields, allParams), HttpStatus.OK);
+ }
+
+ } catch (Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity patchAlarm(@Valid AlarmUpdate body, String id) {
+ Alarm c = alarmRepoService.updateAlarm( id, body );
+
+ return new ResponseEntity(c, HttpStatus.OK);
+ }
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity retrieveAlarm(String id, @Valid String fields) {
+ try {
+
+ return new ResponseEntity( alarmRepoService.findById( id ), HttpStatus.OK);
+ } catch ( Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/AlarmApiRouteBuilder.java b/src/main/java/org/etsi/osl/tmf/am642/api/AlarmApiRouteBuilder.java
new file mode 100644
index 0000000000000000000000000000000000000000..c9f7dd6e210115aacb2bbdb373f6a656c873615a
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/AlarmApiRouteBuilder.java
@@ -0,0 +1,111 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.io.IOException;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.apache.camel.LoggingLevel;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.model.dataformat.JsonLibrary;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.etsi.osl.centrallog.client.CentralLogger;
+import org.etsi.osl.tmf.am642.model.AlarmCreate;
+import org.etsi.osl.tmf.am642.model.AlarmUpdate;
+import org.etsi.osl.tmf.am642.reposervices.AlarmRepoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.stereotype.Component;
+
+@Configuration
+@Component
+public class AlarmApiRouteBuilder extends RouteBuilder {
+
+ private static final transient Log logger = LogFactory.getLog(AlarmApiRouteBuilder.class.getName());
+
+
+ @Value("${ALARMS_ADD_ALARM}")
+ private String ALARMS_ADD_ALARM ="";
+
+ @Value("${ALARMS_UPDATE_ALARM}")
+ private String ALARMS_UPDATE_ALARM ="";
+
+ @Value("${ALARMS_GET_ALARM}")
+ private String ALARMS_GET_ALARM ="";
+
+
+
+ @Value("${spring.application.name}")
+ private String compname;
+
+ @Autowired
+ AlarmRepoService alarmRepoService;
+
+
+ @Autowired
+ private ProducerTemplate template;
+
+
+ @Autowired
+ private CentralLogger centralLogger;
+
+ @Override
+ public void configure() throws Exception {
+
+ from( ALARMS_ADD_ALARM )
+ .log(LoggingLevel.INFO, log, ALARMS_ADD_ALARM + " message received!")
+ .to("log:DEBUG?showBody=true&showHeaders=true")
+ .unmarshal()
+ .json(JsonLibrary.Jackson, AlarmCreate.class, true)
+ .bean( alarmRepoService, "addAlarm(${body})")
+ .marshal().json( JsonLibrary.Jackson, String.class)
+ .convertBodyTo( String.class );
+
+ from( ALARMS_UPDATE_ALARM )
+ .log(LoggingLevel.INFO, log, ALARMS_UPDATE_ALARM + " message received!")
+ .to("log:DEBUG?showBody=true&showHeaders=true")
+ .unmarshal()
+ .json(JsonLibrary.Jackson, AlarmUpdate.class, true)
+ .bean( alarmRepoService, "updateAlarm(${header.alarmid}, ${body})")
+ .bean( alarmRepoService, "findByUuidEager(${header.alarmid})")
+ .marshal().json( JsonLibrary.Jackson, String.class)
+ .convertBodyTo( String.class );
+
+ from( ALARMS_GET_ALARM )
+ .log(LoggingLevel.INFO, log, ALARMS_GET_ALARM + " message received!")
+ .to("log:DEBUG?showBody=true&showHeaders=true")
+ .bean( alarmRepoService, "findByUuidEager(${header.alarmid})")
+ .marshal().json( JsonLibrary.Jackson, String.class)
+ .convertBodyTo( String.class );
+
+ }
+
+
+ static String toJsonString(Object object) throws IOException {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+ return mapper.writeValueAsString(object);
+ }
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/AlarmApiRouteBuilderEvents.java b/src/main/java/org/etsi/osl/tmf/am642/api/AlarmApiRouteBuilderEvents.java
new file mode 100644
index 0000000000000000000000000000000000000000..b53aea657ea9c88a8c4e1e7d11a3d85703e24fe4
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/AlarmApiRouteBuilderEvents.java
@@ -0,0 +1,105 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.etsi.osl.centrallog.client.CLevel;
+import org.etsi.osl.centrallog.client.CentralLogger;
+import org.etsi.osl.tmf.am642.model.AlarmCreateEvent;
+import org.etsi.osl.tmf.common.model.OpensliceEvent;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.stereotype.Component;
+
+@Configuration
+@Component
+public class AlarmApiRouteBuilderEvents extends RouteBuilder {
+
+ private static final transient Log logger = LogFactory.getLog(AlarmApiRouteBuilderEvents.class.getName());
+
+
+
+ @Value("${EVENT_ALARM_CREATE}")
+ private String EVENT_ALARM_CREATE ="";
+
+
+ @Value("${spring.application.name}")
+ private String compname;
+
+
+ @Autowired
+ private ProducerTemplate template;
+
+
+ @Autowired
+ private CentralLogger centralLogger;
+
+ @Override
+ public void configure() throws Exception {
+
+
+
+ }
+
+ /**
+ * @param n
+ */
+ public void publishEvent(final OpensliceEvent n, final String objId) {
+ n.setEventType( n.getClass().getName());
+ logger.info("will send Event for type " + n.getEventType());
+ try {
+ String msgtopic="";
+
+ if ( n instanceof AlarmCreateEvent) {
+ msgtopic = EVENT_ALARM_CREATE;
+ }
+ Map map = new HashMap<>();
+ map.put("eventid", n.getEventId() );
+ map.put("objId", objId );
+
+ String apayload = toJsonString(n);
+ template.sendBodyAndHeaders(msgtopic, apayload , map);
+
+
+ centralLogger.log( CLevel.INFO, apayload, compname );
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ logger.error("Cannot send Event . " + e.getMessage() );
+ }
+ }
+
+ static String toJsonString(Object object) throws IOException {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+ return mapper.writeValueAsString(object);
+ }
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/ApiException.java b/src/main/java/org/etsi/osl/tmf/am642/api/ApiException.java
new file mode 100644
index 0000000000000000000000000000000000000000..c4c5c2d9f67b97aa8045d65c160d12703b59cbd7
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/ApiException.java
@@ -0,0 +1,29 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.api;
+
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+public class ApiException extends Exception{
+ private int code;
+ public ApiException (int code, String msg) {
+ super(msg);
+ this.code = code;
+ }
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/ApiOriginFilter.java b/src/main/java/org/etsi/osl/tmf/am642/api/ApiOriginFilter.java
new file mode 100644
index 0000000000000000000000000000000000000000..5ac39b2ce0be32b66549b28ea625d6813b37df69
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/ApiOriginFilter.java
@@ -0,0 +1,50 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.io.IOException;
+
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.FilterConfig;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletResponse;
+
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+public class ApiOriginFilter implements jakarta.servlet.Filter {
+ @Override
+ public void doFilter(ServletRequest request, ServletResponse response,
+ FilterChain chain) throws IOException, ServletException {
+ HttpServletResponse res = (HttpServletResponse) response;
+ res.addHeader("Access-Control-Allow-Origin", "*");
+ res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT");
+ res.addHeader("Access-Control-Allow-Headers", "Content-Type");
+ chain.doFilter(request, response);
+ }
+
+ @Override
+ public void destroy() {
+ }
+
+ @Override
+ public void init(FilterConfig filterConfig) throws ServletException {
+ }
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/ApiResponseMessage.java b/src/main/java/org/etsi/osl/tmf/am642/api/ApiResponseMessage.java
new file mode 100644
index 0000000000000000000000000000000000000000..abe236789ca31058576cc94ddc7dfa9c9a0b5270
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/ApiResponseMessage.java
@@ -0,0 +1,88 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import jakarta.xml.bind.annotation.XmlTransient;
+
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+@jakarta.xml.bind.annotation.XmlRootElement
+public class ApiResponseMessage {
+ public static final int ERROR = 1;
+ public static final int WARNING = 2;
+ public static final int INFO = 3;
+ public static final int OK = 4;
+ public static final int TOO_BUSY = 5;
+
+ int code;
+ String type;
+ String message;
+
+ public ApiResponseMessage(){}
+
+ public ApiResponseMessage(int code, String message){
+ this.code = code;
+ switch(code){
+ case ERROR:
+ setType("error");
+ break;
+ case WARNING:
+ setType("warning");
+ break;
+ case INFO:
+ setType("info");
+ break;
+ case OK:
+ setType("ok");
+ break;
+ case TOO_BUSY:
+ setType("too busy");
+ break;
+ default:
+ setType("unknown");
+ break;
+ }
+ this.message = message;
+ }
+
+ @XmlTransient
+ public int getCode() {
+ return code;
+ }
+
+ public void setCode(int code) {
+ this.code = code;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/ClearAlarmsApi.java b/src/main/java/org/etsi/osl/tmf/am642/api/ClearAlarmsApi.java
new file mode 100644
index 0000000000000000000000000000000000000000..5d3a6148520cc719b02b0b98f4e79d4cab9bfb41
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/ClearAlarmsApi.java
@@ -0,0 +1,169 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+/**
+ * NOTE: This class is auto generated by the swagger code generator program (3.0.19).
+ * https://github.com/swagger-api/swagger-codegen
+ * Do not edit the class manually.
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.etsi.osl.tmf.am642.model.ClearAlarms;
+import org.etsi.osl.tmf.am642.model.ClearAlarmsCreate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.Valid;
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+@Tag(name = "clearAlarms", description = "the clearAlarms API")
+public interface ClearAlarmsApi {
+
+ Logger log = LoggerFactory.getLogger(ClearAlarmsApi.class);
+
+ default Optional getObjectMapper(){
+ return Optional.empty();
+ }
+
+ default Optional getRequest(){
+ return Optional.empty();
+ }
+
+ default Optional getAcceptHeader() {
+ return getRequest().map(r -> r.getHeader("Accept"));
+ }
+
+// schema = @Schema(implementation = ClearAlarms.class)
+
+ @Operation(summary = "Creates a ClearAlarms", operationId = "createClearAlarms", description = "This operation creates a ClearAlarms entity.", responses = { @ApiResponse( content= @Content( schema =@Schema(implementation = ClearAlarms.class) ) ) }, tags={ "clearAlarms", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Created"),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/clearAlarms",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity createClearAlarms(@Parameter(description = "The ClearAlarms to be created" ,required=true ) @Valid @RequestBody ClearAlarmsCreate body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"alarmPattern\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@type\" : \"@type\",\r\n \"clearedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"clearSystemId\" : \"clearSystemId\"\r\n}", ClearAlarms.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default ClearAlarmsApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "List or find ClearAlarms objects", operationId = "listClearAlarms", description = "This operation list or find ClearAlarms entities" , tags={ "clearAlarms", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode ="200", description = "Success" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/clearAlarms",
+ produces = { "application/json;charset=utf-8" },
+ method = RequestMethod.GET)
+ default ResponseEntity> listClearAlarms(@Parameter(description = "Comma-separated properties to be provided in response") @Valid @RequestParam(value = "fields", required = false) String fields
+,@Parameter(description = "Requested index for start of resources to be provided in response") @Valid @RequestParam(value = "offset", required = false) Integer offset
+,@Parameter(description = "Requested number of resources to be provided in response") @Valid @RequestParam(value = "limit", required = false) Integer limit
+, Map allParams
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("[ {\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"alarmPattern\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@type\" : \"@type\",\r\n \"clearedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"clearSystemId\" : \"clearSystemId\"\r\n}, {\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"alarmPattern\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@type\" : \"@type\",\r\n \"clearedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"clearSystemId\" : \"clearSystemId\"\r\n} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default ClearAlarmsApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Retrieves a ClearAlarms by ID", operationId = "retrieveClearAlarms", description = "This operation retrieves a ClearAlarms entity. Attribute selection is enabled for all first level attributes.", tags={ "clearAlarms", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode ="200", description = "Success" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/clearAlarms/{id}",
+ produces = { "application/json;charset=utf-8" },
+ method = RequestMethod.GET)
+ default ResponseEntity retrieveClearAlarms(@Parameter(description = "Identifier of the ClearAlarms",required=true) @PathVariable("id") String id
+,@Parameter(description = "Comma-separated properties to provide in response") @Valid @RequestParam(value = "fields", required = false) String fields
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"alarmPattern\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@type\" : \"@type\",\r\n \"clearedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"clearSystemId\" : \"clearSystemId\"\r\n}", ClearAlarms.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default ClearAlarmsApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/ClearAlarmsApiController.java b/src/main/java/org/etsi/osl/tmf/am642/api/ClearAlarmsApiController.java
new file mode 100644
index 0000000000000000000000000000000000000000..3bcd49465c858bd5c2cd476d78f3682bf5f3399e
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/ClearAlarmsApiController.java
@@ -0,0 +1,132 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.etsi.osl.tmf.am642.model.ClearAlarms;
+import org.etsi.osl.tmf.am642.model.ClearAlarmsCreate;
+import org.etsi.osl.tmf.am642.reposervices.ClearAlarmsRepoService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.Valid;
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+@Controller
+@RequestMapping("/alarmManagement/v4/")
+public class ClearAlarmsApiController implements ClearAlarmsApi {
+
+ private final ObjectMapper objectMapper;
+
+ private final HttpServletRequest request;
+ private static final Logger log = LoggerFactory.getLogger(ClearAlarmsApiController.class);
+
+ @Autowired
+ ClearAlarmsRepoService clearAlarmRepoService;
+
+
+ @org.springframework.beans.factory.annotation.Autowired
+ public ClearAlarmsApiController(ObjectMapper objectMapper, HttpServletRequest request) {
+ this.objectMapper = objectMapper;
+ this.request = request;
+ }
+
+ @Override
+ public Optional getObjectMapper() {
+ return Optional.ofNullable(objectMapper);
+ }
+
+ @Override
+ public Optional getRequest() {
+ return Optional.ofNullable(request);
+ }
+
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity createClearAlarms(@Valid ClearAlarmsCreate body) {
+ try {
+
+ ClearAlarms c = clearAlarmRepoService.addClearAlarm( body );
+
+ return new ResponseEntity(c, HttpStatus.OK);
+ } catch (Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity> listClearAlarms(@Valid String fields, @Valid Integer offset,
+ @Valid Integer limit, Map allParams) {
+ try {
+ if (allParams != null) {
+ allParams.remove("fields");
+ allParams.remove("offset");
+ allParams.remove("limit");
+ } else {
+ allParams = new HashMap<>();
+ }
+ if ((fields == null) && (allParams.size() == 0)) {
+
+ String myfields = "lastUpdate,lifecycleStatus";
+ return new ResponseEntity>(
+ clearAlarmRepoService.findAll( myfields, allParams), HttpStatus.OK);
+
+
+ } else {
+
+
+ return new ResponseEntity>(
+ clearAlarmRepoService.findAll(fields, allParams), HttpStatus.OK);
+ }
+
+ } catch (Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity retrieveClearAlarms(String id, @Valid String fields) {
+ try {
+
+ return new ResponseEntity( clearAlarmRepoService.findById( id ), HttpStatus.OK);
+ } catch ( Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/CommentAlarmsApi.java b/src/main/java/org/etsi/osl/tmf/am642/api/CommentAlarmsApi.java
new file mode 100644
index 0000000000000000000000000000000000000000..529bf3d2088ae6618805dba2a699e694efd18918
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/CommentAlarmsApi.java
@@ -0,0 +1,164 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+/**
+ * NOTE: This class is auto generated by the swagger code generator program (3.0.19).
+ * https://github.com/swagger-api/swagger-codegen
+ * Do not edit the class manually.
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.etsi.osl.tmf.am642.model.CommentAlarms;
+import org.etsi.osl.tmf.am642.model.CommentAlarmsCreate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.Valid;
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+@Tag(name = "commentAlarms", description = "the commentAlarms API")
+public interface CommentAlarmsApi {
+
+ Logger log = LoggerFactory.getLogger(CommentAlarmsApi.class);
+
+ default Optional getObjectMapper(){
+ return Optional.empty();
+ }
+
+ default Optional getRequest(){
+ return Optional.empty();
+ }
+
+ default Optional getAcceptHeader() {
+ return getRequest().map(r -> r.getHeader("Accept"));
+ }
+
+ @Operation(summary = "Creates a CommentAlarms", operationId = "createCommentAlarms", description = "This operation creates a CommentAlarms entity.", tags={ "commentAlarms", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Created"),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/commentAlarms",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity createCommentAlarms(@Parameter(description = "The CommentAlarms to be created" ,required=true ) @Valid @RequestBody CommentAlarmsCreate body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"commentedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@baseType\" : \"@baseType\",\r\n \"alarmPattern\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@type\" : \"@type\",\r\n \"comment\" : {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n },\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n}", CommentAlarms.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default CommentAlarmsApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "List or find CommentAlarms objects", operationId = "listCommentAlarms", description = "This operation list or find CommentAlarms entities" , tags={ "commentAlarms", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode ="200", description = "Success" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/commentAlarms",
+ produces = { "application/json;charset=utf-8" },
+ method = RequestMethod.GET)
+ default ResponseEntity> listCommentAlarms(@Parameter(description = "Comma-separated properties to be provided in response") @Valid @RequestParam(value = "fields", required = false) String fields
+,@Parameter(description = "Requested index for start of resources to be provided in response") @Valid @RequestParam(value = "offset", required = false) Integer offset
+,@Parameter(description = "Requested number of resources to be provided in response") @Valid @RequestParam(value = "limit", required = false) Integer limit
+, Map allParams) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("[ {\r\n \"commentedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@baseType\" : \"@baseType\",\r\n \"alarmPattern\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@type\" : \"@type\",\r\n \"comment\" : {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n },\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n}, {\r\n \"commentedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@baseType\" : \"@baseType\",\r\n \"alarmPattern\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@type\" : \"@type\",\r\n \"comment\" : {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n },\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default CommentAlarmsApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Retrieves a CommentAlarms by ID", operationId = "retrieveCommentAlarms", description = "This operation retrieves a CommentAlarms entity. Attribute selection is enabled for all first level attributes.", tags={ "commentAlarms", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode ="200", description = "Success" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/commentAlarms/{id}",
+ produces = { "application/json;charset=utf-8" },
+ method = RequestMethod.GET)
+ default ResponseEntity retrieveCommentAlarms(@Parameter(description = "Identifier of the CommentAlarms",required=true) @PathVariable("id") String id
+,@Parameter(description = "Comma-separated properties to provide in response") @Valid @RequestParam(value = "fields", required = false) String fields
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"commentedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@baseType\" : \"@baseType\",\r\n \"alarmPattern\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@type\" : \"@type\",\r\n \"comment\" : {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n },\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n}", CommentAlarms.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default CommentAlarmsApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/CommentAlarmsApiController.java b/src/main/java/org/etsi/osl/tmf/am642/api/CommentAlarmsApiController.java
new file mode 100644
index 0000000000000000000000000000000000000000..b5fe3279acfc99b8fbfad845b735399673377941
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/CommentAlarmsApiController.java
@@ -0,0 +1,129 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.etsi.osl.tmf.am642.model.CommentAlarms;
+import org.etsi.osl.tmf.am642.model.CommentAlarmsCreate;
+import org.etsi.osl.tmf.am642.reposervices.CommentAlarmsRepoService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.Valid;
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+@Controller
+@RequestMapping("/alarmManagement/v4/")
+public class CommentAlarmsApiController implements CommentAlarmsApi {
+
+ private final ObjectMapper objectMapper;
+
+ private final HttpServletRequest request;
+
+ @Autowired
+ CommentAlarmsRepoService commentAlarmRepoService;
+
+ private static final Logger log = LoggerFactory.getLogger(CommentAlarmsApiController.class);
+
+ @org.springframework.beans.factory.annotation.Autowired
+ public CommentAlarmsApiController(ObjectMapper objectMapper, HttpServletRequest request) {
+ this.objectMapper = objectMapper;
+ this.request = request;
+ }
+
+ @Override
+ public Optional getObjectMapper() {
+ return Optional.ofNullable(objectMapper);
+ }
+
+ @Override
+ public Optional getRequest() {
+ return Optional.ofNullable(request);
+ }
+
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity createCommentAlarms(@Valid CommentAlarmsCreate body) {
+ try {
+
+ CommentAlarms c = commentAlarmRepoService.addCommentAlarms(body);
+
+ return new ResponseEntity(c, HttpStatus.OK);
+ } catch (Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity retrieveCommentAlarms(String id, @Valid String fields) {
+ try {
+
+ return new ResponseEntity(commentAlarmRepoService.findById(id), HttpStatus.OK);
+ } catch (Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity> listCommentAlarms(@Valid String fields, @Valid Integer offset,
+ @Valid Integer limit, Map allParams) {
+ try {
+ if (allParams != null) {
+ allParams.remove("fields");
+ allParams.remove("offset");
+ allParams.remove("limit");
+ } else {
+ allParams = new HashMap<>();
+ }
+ if ((fields == null) && (allParams.size() == 0)) {
+
+ String myfields = "lastUpdate,lifecycleStatus";
+ return new ResponseEntity>(commentAlarmRepoService.findAll(myfields, allParams),
+ HttpStatus.OK);
+
+ } else {
+
+ return new ResponseEntity>(commentAlarmRepoService.findAll(fields, allParams),
+ HttpStatus.OK);
+ }
+
+ } catch (Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/GroupAlarmsApi.java b/src/main/java/org/etsi/osl/tmf/am642/api/GroupAlarmsApi.java
new file mode 100644
index 0000000000000000000000000000000000000000..d595a826db0f212973a6353e669ab5477c69ec28
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/GroupAlarmsApi.java
@@ -0,0 +1,169 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+/**
+ * NOTE: This class is auto generated by the swagger code generator program (3.0.19).
+ * https://github.com/swagger-api/swagger-codegen
+ * Do not edit the class manually.
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.etsi.osl.tmf.am642.model.GroupAlarms;
+import org.etsi.osl.tmf.am642.model.GroupAlarmsCreate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.Valid;
+
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+@Tag(name = "groupAlarms", description = "the groupAlarms API")
+public interface GroupAlarmsApi {
+
+ Logger log = LoggerFactory.getLogger(GroupAlarmsApi.class);
+
+ default Optional getObjectMapper() {
+ return Optional.empty();
+ }
+
+ default Optional getRequest() {
+ return Optional.empty();
+ }
+
+ default Optional getAcceptHeader() {
+ return getRequest().map(r -> r.getHeader("Accept"));
+ }
+
+ @Operation(summary = "Creates a GroupAlarms", operationId = "createGroupAlarms", description = "This operation creates a GroupAlarms entity." , tags = {
+ "groupAlarms", })
+ @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Created" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/groupAlarms", produces = { "application/json;charset=utf-8" }, consumes = {
+ "application/json;charset=utf-8" }, method = RequestMethod.POST)
+ default ResponseEntity createGroupAlarms(
+ @Parameter(description = "The GroupAlarms to be created", required = true) @Valid @RequestBody GroupAlarmsCreate body) {
+ if (getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue(
+ "{\r\n \"@baseType\" : \"@baseType\",\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"@type\" : \"@type\",\r\n \"groupedAlarm\" : [ null, null ],\r\n \"correlatedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\"\r\n}",
+ GroupAlarms.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn(
+ "ObjectMapper or HttpServletRequest not configured in default GroupAlarmsApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+ @Operation(summary = "List or find GroupAlarms objects", operationId = "listGroupAlarms", description = "This operation list or find GroupAlarms entities" , tags = {
+ "groupAlarms", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode ="200", description = "Success" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/groupAlarms", produces = { "application/json;charset=utf-8" }, method = RequestMethod.GET)
+ default ResponseEntity> listGroupAlarms(
+ @Parameter(description = "Comma-separated properties to be provided in response") @Valid @RequestParam(value = "fields", required = false) String fields,
+ @Parameter(description = "Requested index for start of resources to be provided in response") @Valid @RequestParam(value = "offset", required = false) Integer offset,
+ @Parameter(description = "Requested number of resources to be provided in response") @Valid @RequestParam(value = "limit", required = false) Integer limit,
+ Map allParams) {
+ if (getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue(
+ "[ {\r\n \"@baseType\" : \"@baseType\",\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"@type\" : \"@type\",\r\n \"groupedAlarm\" : [ null, null ],\r\n \"correlatedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\"\r\n}, {\r\n \"@baseType\" : \"@baseType\",\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"@type\" : \"@type\",\r\n \"groupedAlarm\" : [ null, null ],\r\n \"correlatedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\"\r\n} ]",
+ List.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn(
+ "ObjectMapper or HttpServletRequest not configured in default GroupAlarmsApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+ @Operation(summary = "Retrieves a GroupAlarms by ID", operationId = "retrieveGroupAlarms", description = "This operation retrieves a GroupAlarms entity. Attribute selection is enabled for all first level attributes." , tags = {
+ "groupAlarms", })
+ @ApiResponses(value = { @ApiResponse(responseCode ="200", description = "Success" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/groupAlarms/{id}", produces = {
+ "application/json;charset=utf-8" }, method = RequestMethod.GET)
+ default ResponseEntity retrieveGroupAlarms(
+ @Parameter(description = "Identifier of the GroupAlarms", required = true) @PathVariable("id") String id,
+ @Parameter(description = "Comma-separated properties to provide in response") @Valid @RequestParam(value = "fields", required = false) String fields) {
+ if (getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue(
+ "{\r\n \"@baseType\" : \"@baseType\",\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"@type\" : \"@type\",\r\n \"groupedAlarm\" : [ null, null ],\r\n \"correlatedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\"\r\n}",
+ GroupAlarms.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn(
+ "ObjectMapper or HttpServletRequest not configured in default GroupAlarmsApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/GroupAlarmsApiController.java b/src/main/java/org/etsi/osl/tmf/am642/api/GroupAlarmsApiController.java
new file mode 100644
index 0000000000000000000000000000000000000000..39c68d79f0cdf51a48e01b86e3d2bc36c4400e69
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/GroupAlarmsApiController.java
@@ -0,0 +1,124 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.etsi.osl.tmf.am642.model.GroupAlarms;
+import org.etsi.osl.tmf.am642.model.GroupAlarmsCreate;
+import org.etsi.osl.tmf.am642.reposervices.GroupAlarmsRepoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.Valid;
+
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+@Controller
+@RequestMapping("/alarmManagement/v4/")
+public class GroupAlarmsApiController implements GroupAlarmsApi {
+
+ private final ObjectMapper objectMapper;
+
+ private final HttpServletRequest request;
+
+ @Autowired
+ GroupAlarmsRepoService groupAlarmRepoService;
+
+ @org.springframework.beans.factory.annotation.Autowired
+ public GroupAlarmsApiController(ObjectMapper objectMapper, HttpServletRequest request) {
+ this.objectMapper = objectMapper;
+ this.request = request;
+ }
+
+ @Override
+ public Optional getObjectMapper() {
+ return Optional.ofNullable(objectMapper);
+ }
+
+ @Override
+ public Optional getRequest() {
+ return Optional.ofNullable(request);
+ }
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity createGroupAlarms(@Valid GroupAlarmsCreate body) {
+ try {
+
+ GroupAlarms c = groupAlarmRepoService.addGroupAlarms(body);
+
+ return new ResponseEntity(c, HttpStatus.OK);
+ } catch (Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity retrieveGroupAlarms(String id, @Valid String fields) {
+ try {
+
+ return new ResponseEntity(groupAlarmRepoService.findById(id), HttpStatus.OK);
+ } catch (Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity> listGroupAlarms(@Valid String fields, @Valid Integer offset,
+ @Valid Integer limit, Map allParams) {
+ try {
+ if (allParams != null) {
+ allParams.remove("fields");
+ allParams.remove("offset");
+ allParams.remove("limit");
+ } else {
+ allParams = new HashMap<>();
+ }
+ if ((fields == null) && (allParams.size() == 0)) {
+
+ String myfields = "lastUpdate,lifecycleStatus";
+ return new ResponseEntity>(groupAlarmRepoService.findAll(myfields, allParams),
+ HttpStatus.OK);
+
+ } else {
+
+ return new ResponseEntity>(groupAlarmRepoService.findAll(fields, allParams),
+ HttpStatus.OK);
+ }
+
+ } catch (Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/HubApi.java b/src/main/java/org/etsi/osl/tmf/am642/api/HubApi.java
new file mode 100644
index 0000000000000000000000000000000000000000..7463e6bcf9b467570d78367f6a022fd22a56a3f0
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/HubApi.java
@@ -0,0 +1,119 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+/**
+ * NOTE: This class is auto generated by the swagger code generator program (3.0.19).
+ * https://github.com/swagger-api/swagger-codegen
+ * Do not edit the class manually.
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.io.IOException;
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.etsi.osl.tmf.am642.model.EventSubscription;
+import org.etsi.osl.tmf.am642.model.EventSubscriptionInput;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.Valid;
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+@Tag(name = "hub", description = "the hub API")
+public interface HubApi {
+
+ Logger log = LoggerFactory.getLogger(HubApi.class);
+
+ default Optional getObjectMapper(){
+ return Optional.empty();
+ }
+
+ default Optional getRequest(){
+ return Optional.empty();
+ }
+
+ default Optional getAcceptHeader() {
+ return getRequest().map(r -> r.getHeader("Accept"));
+ }
+
+ @Operation(summary = "Register a listener", operationId = "registerListener642", description = "Sets the communication endpoint address the service instance must use to deliver information about its health state, execution state, failures and metrics.", tags={ "events subscription", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Subscribed" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/hub",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity registerListener(@Parameter(description = "Data containing the callback endpoint to deliver the information" ,required=true ) @Valid @RequestBody EventSubscriptionInput body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"query\" : \"query\",\r\n \"callback\" : \"callback\",\r\n \"id\" : \"id\"\r\n}", EventSubscription.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default HubApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Unregister a listener", operationId = "unregisterListener642", description = "Resets the communication endpoint address the service instance must use to deliver information about its health state, execution state, failures and metrics.", tags={ "events subscription", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "204", description = "Deleted"),
+ @ApiResponse(responseCode = "400", description = "Bad request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method not allowed" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/hub/{id}",
+ produces = { "application/json;charset=utf-8" },
+ method = RequestMethod.DELETE)
+ default ResponseEntity unregisterListener(@Parameter(description = "The id of the registered listener",required=true) @PathVariable("id") String id
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default HubApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/HubApiController.java b/src/main/java/org/etsi/osl/tmf/am642/api/HubApiController.java
new file mode 100644
index 0000000000000000000000000000000000000000..b3c83b84f36e48e4dbe8d0652564177de6f3b2af
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/HubApiController.java
@@ -0,0 +1,56 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import jakarta.servlet.http.HttpServletRequest;
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+
+@Controller("HubApiController642")
+@RequestMapping("/alarmManagement/v4/")
+public class HubApiController implements HubApi {
+
+ private final ObjectMapper objectMapper;
+
+ private final HttpServletRequest request;
+
+ @org.springframework.beans.factory.annotation.Autowired
+ public HubApiController(ObjectMapper objectMapper, HttpServletRequest request) {
+ this.objectMapper = objectMapper;
+ this.request = request;
+ }
+
+ @Override
+ public Optional getObjectMapper() {
+ return Optional.ofNullable(objectMapper);
+ }
+
+ @Override
+ public Optional getRequest() {
+ return Optional.ofNullable(request);
+ }
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/ListenerApi.java b/src/main/java/org/etsi/osl/tmf/am642/api/ListenerApi.java
new file mode 100644
index 0000000000000000000000000000000000000000..e00e2533dc8a2f95d38ba8343e9f4bb7e227a49e
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/ListenerApi.java
@@ -0,0 +1,591 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+/**
+ * NOTE: This class is auto generated by the swagger code generator program (3.0.19).
+ * https://github.com/swagger-api/swagger-codegen
+ * Do not edit the class manually.
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.io.IOException;
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.etsi.osl.tmf.am642.model.AckAlarmsCreateEvent;
+import org.etsi.osl.tmf.am642.model.AckAlarmsStateChangeEvent;
+import org.etsi.osl.tmf.am642.model.AlarmAttributeValueChangeEvent;
+import org.etsi.osl.tmf.am642.model.AlarmCreateEvent;
+import org.etsi.osl.tmf.am642.model.AlarmDeleteEvent;
+import org.etsi.osl.tmf.am642.model.AlarmStateChangeEvent;
+import org.etsi.osl.tmf.am642.model.ClearAlarmsCreateEvent;
+import org.etsi.osl.tmf.am642.model.ClearAlarmsStateChangeEvent;
+import org.etsi.osl.tmf.am642.model.CommentAlarmsCreateEvent;
+import org.etsi.osl.tmf.am642.model.CommentAlarmsStateChangeEvent;
+import org.etsi.osl.tmf.am642.model.EventSubscription;
+import org.etsi.osl.tmf.am642.model.GroupAlarmsCreateEvent;
+import org.etsi.osl.tmf.am642.model.GroupAlarmsStateChangeEvent;
+import org.etsi.osl.tmf.am642.model.UnAckAlarmsCreateEvent;
+import org.etsi.osl.tmf.am642.model.UnAckAlarmsStateChangeEvent;
+import org.etsi.osl.tmf.am642.model.UnGroupAlarmsCreateEvent;
+import org.etsi.osl.tmf.am642.model.UnGroupAlarmsStateChangeEvent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.Valid;
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+@Tag(name = "listener", description = "the listener API")
+public interface ListenerApi {
+
+ Logger log = LoggerFactory.getLogger(ListenerApi.class);
+
+ default Optional getObjectMapper(){
+ return Optional.empty();
+ }
+
+ default Optional getRequest(){
+ return Optional.empty();
+ }
+
+ default Optional getAcceptHeader() {
+ return getRequest().map(r -> r.getHeader("Accept"));
+ }
+
+ @Operation(summary = "Client listener for entity AckAlarmsCreateEvent", operationId = "listenToAckAlarmsCreateEvent", description = "Example of a client listener for receiving the notification AckAlarmsCreateEvent", tags={ "notification listeners (client side)", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Notified" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/listener/ackAlarmsCreateEvent",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity listenToAckAlarmsCreateEvent(@Parameter(description = "The event data" ,required=true ) @Valid @RequestBody AckAlarmsCreateEvent body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"query\" : \"query\",\r\n \"callback\" : \"callback\",\r\n \"id\" : \"id\"\r\n}", EventSubscription.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default ListenerApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Client listener for entity AckAlarmsStateChangeEvent", operationId = "listenToAckAlarmsStateChangeEvent", description = "Example of a client listener for receiving the notification AckAlarmsStateChangeEvent", tags={ "notification listeners (client side)", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Notified" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/listener/ackAlarmsStateChangeEvent",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity listenToAckAlarmsStateChangeEvent(@Parameter(description = "The event data" ,required=true ) @Valid @RequestBody AckAlarmsStateChangeEvent body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"query\" : \"query\",\r\n \"callback\" : \"callback\",\r\n \"id\" : \"id\"\r\n}", EventSubscription.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default ListenerApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Client listener for entity AlarmAttributeValueChangeEvent", operationId = "listenToAlarmAttributeValueChangeEvent", description = "Example of a client listener for receiving the notification AlarmAttributeValueChangeEvent", tags={ "notification listeners (client side)", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Notified" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/listener/alarmAttributeValueChangeEvent",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity listenToAlarmAttributeValueChangeEvent(@Parameter(description = "The event data" ,required=true ) @Valid @RequestBody AlarmAttributeValueChangeEvent body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"query\" : \"query\",\r\n \"callback\" : \"callback\",\r\n \"id\" : \"id\"\r\n}", EventSubscription.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default ListenerApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Client listener for entity AlarmCreateEvent", operationId = "listenToAlarmCreateEvent", description = "Example of a client listener for receiving the notification AlarmCreateEvent", tags={ "notification listeners (client side)", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Notified" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/listener/alarmCreateEvent",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity listenToAlarmCreateEvent(@Parameter(description = "The event data" ,required=true ) @Valid @RequestBody AlarmCreateEvent body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"query\" : \"query\",\r\n \"callback\" : \"callback\",\r\n \"id\" : \"id\"\r\n}", EventSubscription.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default ListenerApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Client listener for entity AlarmDeleteEvent", operationId = "listenToAlarmDeleteEvent", description = "Example of a client listener for receiving the notification AlarmDeleteEvent", tags={ "notification listeners (client side)", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Notified" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/listener/alarmDeleteEvent",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity listenToAlarmDeleteEvent(@Parameter(description = "The event data" ,required=true ) @Valid @RequestBody AlarmDeleteEvent body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"query\" : \"query\",\r\n \"callback\" : \"callback\",\r\n \"id\" : \"id\"\r\n}", EventSubscription.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default ListenerApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Client listener for entity AlarmStateChangeEvent", operationId = "listenToAlarmStateChangeEvent", description = "Example of a client listener for receiving the notification AlarmStateChangeEvent", tags={ "notification listeners (client side)", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Notified" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/listener/alarmStateChangeEvent",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity listenToAlarmStateChangeEvent(@Parameter(description = "The event data" ,required=true ) @Valid @RequestBody AlarmStateChangeEvent body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"query\" : \"query\",\r\n \"callback\" : \"callback\",\r\n \"id\" : \"id\"\r\n}", EventSubscription.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default ListenerApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Client listener for entity ClearAlarmsCreateEvent", operationId = "listenToClearAlarmsCreateEvent", description = "Example of a client listener for receiving the notification ClearAlarmsCreateEvent", tags={ "notification listeners (client side)", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Notified" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/listener/clearAlarmsCreateEvent",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity listenToClearAlarmsCreateEvent(@Parameter(description = "The event data" ,required=true ) @Valid @RequestBody ClearAlarmsCreateEvent body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"query\" : \"query\",\r\n \"callback\" : \"callback\",\r\n \"id\" : \"id\"\r\n}", EventSubscription.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default ListenerApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Client listener for entity ClearAlarmsStateChangeEvent", operationId = "listenToClearAlarmsStateChangeEvent", description = "Example of a client listener for receiving the notification ClearAlarmsStateChangeEvent", tags={ "notification listeners (client side)", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Notified" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/listener/clearAlarmsStateChangeEvent",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity listenToClearAlarmsStateChangeEvent(@Parameter(description = "The event data" ,required=true ) @Valid @RequestBody ClearAlarmsStateChangeEvent body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"query\" : \"query\",\r\n \"callback\" : \"callback\",\r\n \"id\" : \"id\"\r\n}", EventSubscription.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default ListenerApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Client listener for entity CommentAlarmsCreateEvent", operationId = "listenToCommentAlarmsCreateEvent", description = "Example of a client listener for receiving the notification CommentAlarmsCreateEvent", tags={ "notification listeners (client side)", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Notified" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/listener/commentAlarmsCreateEvent",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity listenToCommentAlarmsCreateEvent(@Parameter(description = "The event data" ,required=true ) @Valid @RequestBody CommentAlarmsCreateEvent body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"query\" : \"query\",\r\n \"callback\" : \"callback\",\r\n \"id\" : \"id\"\r\n}", EventSubscription.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default ListenerApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Client listener for entity CommentAlarmsStateChangeEvent", operationId = "listenToCommentAlarmsStateChangeEvent", description = "Example of a client listener for receiving the notification CommentAlarmsStateChangeEvent", tags={ "notification listeners (client side)", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Notified" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/listener/commentAlarmsStateChangeEvent",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity listenToCommentAlarmsStateChangeEvent(@Parameter(description = "The event data" ,required=true ) @Valid @RequestBody CommentAlarmsStateChangeEvent body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"query\" : \"query\",\r\n \"callback\" : \"callback\",\r\n \"id\" : \"id\"\r\n}", EventSubscription.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default ListenerApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Client listener for entity GroupAlarmsCreateEvent", operationId = "listenToGroupAlarmsCreateEvent", description = "Example of a client listener for receiving the notification GroupAlarmsCreateEvent", tags={ "notification listeners (client side)", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Notified" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/listener/groupAlarmsCreateEvent",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity listenToGroupAlarmsCreateEvent(@Parameter(description = "The event data" ,required=true ) @Valid @RequestBody GroupAlarmsCreateEvent body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"query\" : \"query\",\r\n \"callback\" : \"callback\",\r\n \"id\" : \"id\"\r\n}", EventSubscription.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default ListenerApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Client listener for entity GroupAlarmsStateChangeEvent", operationId = "listenToGroupAlarmsStateChangeEvent", description = "Example of a client listener for receiving the notification GroupAlarmsStateChangeEvent", tags={ "notification listeners (client side)", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Notified" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/listener/groupAlarmsStateChangeEvent",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity listenToGroupAlarmsStateChangeEvent(@Parameter(description = "The event data" ,required=true ) @Valid @RequestBody GroupAlarmsStateChangeEvent body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"query\" : \"query\",\r\n \"callback\" : \"callback\",\r\n \"id\" : \"id\"\r\n}", EventSubscription.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default ListenerApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Client listener for entity UnAckAlarmsCreateEvent", operationId = "listenToUnAckAlarmsCreateEvent", description = "Example of a client listener for receiving the notification UnAckAlarmsCreateEvent", tags={ "notification listeners (client side)", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Notified" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/listener/unAckAlarmsCreateEvent",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity listenToUnAckAlarmsCreateEvent(@Parameter(description = "The event data" ,required=true ) @Valid @RequestBody UnAckAlarmsCreateEvent body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"query\" : \"query\",\r\n \"callback\" : \"callback\",\r\n \"id\" : \"id\"\r\n}", EventSubscription.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default ListenerApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Client listener for entity UnAckAlarmsStateChangeEvent", operationId = "listenToUnAckAlarmsStateChangeEvent", description = "Example of a client listener for receiving the notification UnAckAlarmsStateChangeEvent", tags={ "notification listeners (client side)", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Notified" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/listener/unAckAlarmsStateChangeEvent",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity listenToUnAckAlarmsStateChangeEvent(@Parameter(description = "The event data" ,required=true ) @Valid @RequestBody UnAckAlarmsStateChangeEvent body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"query\" : \"query\",\r\n \"callback\" : \"callback\",\r\n \"id\" : \"id\"\r\n}", EventSubscription.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default ListenerApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Client listener for entity UnGroupAlarmsCreateEvent", operationId = "listenToUnGroupAlarmsCreateEvent", description = "Example of a client listener for receiving the notification UnGroupAlarmsCreateEvent", tags={ "notification listeners (client side)", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Notified" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/listener/unGroupAlarmsCreateEvent",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity listenToUnGroupAlarmsCreateEvent(@Parameter(description = "The event data" ,required=true ) @Valid @RequestBody UnGroupAlarmsCreateEvent body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"query\" : \"query\",\r\n \"callback\" : \"callback\",\r\n \"id\" : \"id\"\r\n}", EventSubscription.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default ListenerApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Client listener for entity UnGroupAlarmsStateChangeEvent", operationId = "listenToUnGroupAlarmsStateChangeEvent", description = "Example of a client listener for receiving the notification UnGroupAlarmsStateChangeEvent", tags={ "notification listeners (client side)", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Notified" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/listener/unGroupAlarmsStateChangeEvent",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity listenToUnGroupAlarmsStateChangeEvent(@Parameter(description = "The event data" ,required=true ) @Valid @RequestBody UnGroupAlarmsStateChangeEvent body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"query\" : \"query\",\r\n \"callback\" : \"callback\",\r\n \"id\" : \"id\"\r\n}", EventSubscription.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default ListenerApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/ListenerApiController.java b/src/main/java/org/etsi/osl/tmf/am642/api/ListenerApiController.java
new file mode 100644
index 0000000000000000000000000000000000000000..c6e443a665fa077927d91286bd8a5ad6ece11ae1
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/ListenerApiController.java
@@ -0,0 +1,56 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import jakarta.servlet.http.HttpServletRequest;
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+
+@Controller("ListenerApiController642")
+@RequestMapping("/alarmManagement/v4/")
+public class ListenerApiController implements ListenerApi {
+
+ private final ObjectMapper objectMapper;
+
+ private final HttpServletRequest request;
+
+ @org.springframework.beans.factory.annotation.Autowired
+ public ListenerApiController(ObjectMapper objectMapper, HttpServletRequest request) {
+ this.objectMapper = objectMapper;
+ this.request = request;
+ }
+
+ @Override
+ public Optional getObjectMapper() {
+ return Optional.ofNullable(objectMapper);
+ }
+
+ @Override
+ public Optional getRequest() {
+ return Optional.ofNullable(request);
+ }
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/NotFoundException.java b/src/main/java/org/etsi/osl/tmf/am642/api/NotFoundException.java
new file mode 100644
index 0000000000000000000000000000000000000000..47d4edaff8d8bd5943f18722203bc315edc15727
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/NotFoundException.java
@@ -0,0 +1,29 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.api;
+
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+public class NotFoundException extends ApiException {
+ private int code;
+ public NotFoundException (int code, String msg) {
+ super(code, msg);
+ this.code = code;
+ }
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/UnAckAlarmsApi.java b/src/main/java/org/etsi/osl/tmf/am642/api/UnAckAlarmsApi.java
new file mode 100644
index 0000000000000000000000000000000000000000..4fefc8271f1221aaba50c121dce128268ce74306
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/UnAckAlarmsApi.java
@@ -0,0 +1,164 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+/**
+ * NOTE: This class is auto generated by the swagger code generator program (3.0.19).
+ * https://github.com/swagger-api/swagger-codegen
+ * Do not edit the class manually.
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.etsi.osl.tmf.am642.model.UnAckAlarms;
+import org.etsi.osl.tmf.am642.model.UnAckAlarmsCreate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.Valid;
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+@Tag(name = "unAckAlarms", description = "the unAckAlarms API")
+public interface UnAckAlarmsApi {
+
+ Logger log = LoggerFactory.getLogger(UnAckAlarmsApi.class);
+
+ default Optional getObjectMapper(){
+ return Optional.empty();
+ }
+
+ default Optional getRequest(){
+ return Optional.empty();
+ }
+
+ default Optional getAcceptHeader() {
+ return getRequest().map(r -> r.getHeader("Accept"));
+ }
+
+ @Operation(summary = "Creates a UnAckAlarms", operationId = "createUnAckAlarms", description = "This operation creates a UnAckAlarms entity.", tags={ "unAckAlarms", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Created" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/unAckAlarms",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity createUnAckAlarms(@Parameter(description = "The UnAckAlarms to be created" ,required=true ) @Valid @RequestBody UnAckAlarmsCreate body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"ackTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"ackUserId\" : \"ackUserId\",\r\n \"unAckedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@baseType\" : \"@baseType\",\r\n \"alarmPattern\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@type\" : \"@type\",\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n}", UnAckAlarms.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default UnAckAlarmsApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "List or find UnAckAlarms objects", operationId = "listUnAckAlarms", description = "This operation list or find UnAckAlarms entities" , tags={ "unAckAlarms", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode ="200", description = "Success" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/unAckAlarms",
+ produces = { "application/json;charset=utf-8" },
+ method = RequestMethod.GET)
+ default ResponseEntity> listUnAckAlarms(@Parameter(description = "Comma-separated properties to be provided in response") @Valid @RequestParam(value = "fields", required = false) String fields
+,@Parameter(description = "Requested index for start of resources to be provided in response") @Valid @RequestParam(value = "offset", required = false) Integer offset
+,@Parameter(description = "Requested number of resources to be provided in response") @Valid @RequestParam(value = "limit", required = false) Integer limit
+, Map allParams) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("[ {\r\n \"ackTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"ackUserId\" : \"ackUserId\",\r\n \"unAckedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@baseType\" : \"@baseType\",\r\n \"alarmPattern\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@type\" : \"@type\",\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n}, {\r\n \"ackTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"ackUserId\" : \"ackUserId\",\r\n \"unAckedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@baseType\" : \"@baseType\",\r\n \"alarmPattern\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@type\" : \"@type\",\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default UnAckAlarmsApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Retrieves a UnAckAlarms by ID", operationId = "retrieveUnAckAlarms", description = "This operation retrieves a UnAckAlarms entity. Attribute selection is enabled for all first level attributes.", tags={ "unAckAlarms", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode ="200", description = "Success" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/unAckAlarms/{id}",
+ produces = { "application/json;charset=utf-8" },
+ method = RequestMethod.GET)
+ default ResponseEntity retrieveUnAckAlarms(@Parameter(description = "Identifier of the UnAckAlarms",required=true) @PathVariable("id") String id
+,@Parameter(description = "Comma-separated properties to provide in response") @Valid @RequestParam(value = "fields", required = false) String fields
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"ackTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"ackUserId\" : \"ackUserId\",\r\n \"unAckedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@baseType\" : \"@baseType\",\r\n \"alarmPattern\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"@type\" : \"@type\",\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n}", UnAckAlarms.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default UnAckAlarmsApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/UnAckAlarmsApiController.java b/src/main/java/org/etsi/osl/tmf/am642/api/UnAckAlarmsApiController.java
new file mode 100644
index 0000000000000000000000000000000000000000..6ca16ef51f9bfdd3f20a6a806aaef6801b72ecd6
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/UnAckAlarmsApiController.java
@@ -0,0 +1,137 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.etsi.osl.tmf.am642.model.UnAckAlarms;
+import org.etsi.osl.tmf.am642.model.UnAckAlarmsCreate;
+import org.etsi.osl.tmf.am642.reposervices.UnAckAlarmsRepoService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.Valid;
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+@Controller
+@RequestMapping("/alarmManagement/v4/")
+public class UnAckAlarmsApiController implements UnAckAlarmsApi {
+
+ private final ObjectMapper objectMapper;
+
+ private final HttpServletRequest request;
+
+ private static final Logger log = LoggerFactory.getLogger(UnAckAlarmsApiController.class);
+
+
+
+ @Autowired
+ UnAckAlarmsRepoService unackAlarmRepoService;
+
+
+ @org.springframework.beans.factory.annotation.Autowired
+ public UnAckAlarmsApiController(ObjectMapper objectMapper, HttpServletRequest request) {
+ this.objectMapper = objectMapper;
+ this.request = request;
+ }
+
+ @Override
+ public Optional getObjectMapper() {
+ return Optional.ofNullable(objectMapper);
+ }
+
+ @Override
+ public Optional getRequest() {
+ return Optional.ofNullable(request);
+ }
+
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity createUnAckAlarms(@Valid UnAckAlarmsCreate body) {
+ try {
+
+ UnAckAlarms c = unackAlarmRepoService.addAckAlarm( body );
+
+ return new ResponseEntity(c, HttpStatus.OK);
+ } catch (Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity> listUnAckAlarms(@Valid String fields, @Valid Integer offset,
+ @Valid Integer limit, Map allParams) {
+ try {
+ if (allParams != null) {
+ allParams.remove("fields");
+ allParams.remove("offset");
+ allParams.remove("limit");
+ } else {
+ allParams = new HashMap<>();
+ }
+ if ((fields == null) && (allParams.size() == 0)) {
+
+ String myfields = "lastUpdate,lifecycleStatus";
+ return new ResponseEntity>(
+ unackAlarmRepoService.findAll( myfields, allParams), HttpStatus.OK);
+
+
+ } else {
+
+
+ return new ResponseEntity>(
+ unackAlarmRepoService.findAll(fields, allParams), HttpStatus.OK);
+ }
+
+ } catch (Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity retrieveUnAckAlarms(String id, @Valid String fields) {
+ try {
+
+ return new ResponseEntity( unackAlarmRepoService.findById( id ), HttpStatus.OK);
+ } catch ( Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/UnGroupAlarmsApi.java b/src/main/java/org/etsi/osl/tmf/am642/api/UnGroupAlarmsApi.java
new file mode 100644
index 0000000000000000000000000000000000000000..d9d855f6fba507c88f1c5ee8851bee7ba83ec4ca
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/UnGroupAlarmsApi.java
@@ -0,0 +1,164 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+/**
+ * NOTE: This class is auto generated by the swagger code generator program (3.0.19).
+ * https://github.com/swagger-api/swagger-codegen
+ * Do not edit the class manually.
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.etsi.osl.tmf.am642.model.UnGroupAlarms;
+import org.etsi.osl.tmf.am642.model.UnGroupAlarmsCreate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.Valid;
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+@Tag(name = "unGroupAlarms", description = "the unGroupAlarms API")
+public interface UnGroupAlarmsApi {
+
+ Logger log = LoggerFactory.getLogger(UnGroupAlarmsApi.class);
+
+ default Optional getObjectMapper(){
+ return Optional.empty();
+ }
+
+ default Optional getRequest(){
+ return Optional.empty();
+ }
+
+ default Optional getAcceptHeader() {
+ return getRequest().map(r -> r.getHeader("Accept"));
+ }
+
+ @Operation(summary = "Creates a UnGroupAlarms", operationId = "createUnGroupAlarms", description = "This operation creates a UnGroupAlarms entity.", tags={ "unGroupAlarms", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode = "400", description = "Created" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/unGroupAlarms",
+ produces = { "application/json;charset=utf-8" },
+ consumes = { "application/json;charset=utf-8" },
+ method = RequestMethod.POST)
+ default ResponseEntity createUnGroupAlarms(@Parameter(description = "The UnGroupAlarms to be created" ,required=true ) @Valid @RequestBody UnGroupAlarmsCreate body
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"@baseType\" : \"@baseType\",\r\n \"unGroupedAlarm\" : [ null, null ],\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"@type\" : \"@type\",\r\n \"correlatedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\"\r\n}", UnGroupAlarms.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default UnGroupAlarmsApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "List or find UnGroupAlarms objects", operationId = "listUnGroupAlarms", description = "This operation list or find UnGroupAlarms entities" , tags={ "unGroupAlarms", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode ="200", description = "Success" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/unGroupAlarms",
+ produces = { "application/json;charset=utf-8" },
+ method = RequestMethod.GET)
+ default ResponseEntity> listUnGroupAlarms(@Parameter(description = "Comma-separated properties to be provided in response") @Valid @RequestParam(value = "fields", required = false) String fields
+,@Parameter(description = "Requested index for start of resources to be provided in response") @Valid @RequestParam(value = "offset", required = false) Integer offset
+,@Parameter(description = "Requested number of resources to be provided in response") @Valid @RequestParam(value = "limit", required = false) Integer limit
+, Map allParams) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("[ {\r\n \"@baseType\" : \"@baseType\",\r\n \"unGroupedAlarm\" : [ null, null ],\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"@type\" : \"@type\",\r\n \"correlatedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\"\r\n}, {\r\n \"@baseType\" : \"@baseType\",\r\n \"unGroupedAlarm\" : [ null, null ],\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"@type\" : \"@type\",\r\n \"correlatedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\"\r\n} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default UnGroupAlarmsApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+
+ @Operation(summary = "Retrieves a UnGroupAlarms by ID", operationId = "retrieveUnGroupAlarms", description = "This operation retrieves a UnGroupAlarms entity. Attribute selection is enabled for all first level attributes.", tags={ "unGroupAlarms", })
+ @ApiResponses(value = {
+ @ApiResponse(responseCode ="200", description = "Success" ),
+ @ApiResponse(responseCode = "400", description = "Bad Request" ),
+ @ApiResponse(responseCode = "401", description = "Unauthorized" ),
+ @ApiResponse(responseCode = "403", description = "Forbidden" ),
+ @ApiResponse(responseCode = "404", description = "Not Found" ),
+ @ApiResponse(responseCode = "405", description = "Method Not allowed" ),
+ @ApiResponse(responseCode = "409", description = "Conflict" ),
+ @ApiResponse(responseCode = "500", description = "Internal Server Error" ) })
+ @RequestMapping(value = "/unGroupAlarms/{id}",
+ produces = { "application/json;charset=utf-8" },
+ method = RequestMethod.GET)
+ default ResponseEntity retrieveUnGroupAlarms(@Parameter(description = "Identifier of the UnGroupAlarms",required=true) @PathVariable("id") String id
+,@Parameter(description = "Comma-separated properties to provide in response") @Valid @RequestParam(value = "fields", required = false) String fields
+) {
+ if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
+ if (getAcceptHeader().get().contains("application/json")) {
+ try {
+ return new ResponseEntity<>(getObjectMapper().get().readValue("{\r\n \"@baseType\" : \"@baseType\",\r\n \"unGroupedAlarm\" : [ null, null ],\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"@type\" : \"@type\",\r\n \"correlatedAlarm\" : [ {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n }, {\r\n \"reportingSystemId\" : \"reportingSystemId\",\r\n \"alarmRaisedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@referredType\" : \"@referredType\",\r\n \"alarmClearedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObjectType\" : \"alarmedObjectType\",\r\n \"@type\" : \"@type\",\r\n \"proposedRepairedActions\" : \"proposedRepairedActions\",\r\n \"correlatedAlarm\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"alarmReportingTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"alarmedObject\" : {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"alarmEscalation\" : true,\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@baseType\" : \"@baseType\",\r\n \"perceivedSeverity\" : \"perceivedSeverity\",\r\n \"probableCause\" : \"probableCause\",\r\n \"affectedService\" : [ {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"ackSystemId\" : \"ackSystemId\",\r\n \"id\" : 0,\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"place\" : [ {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n }, {\r\n \"@referredType\" : \"@referredType\",\r\n \"role\" : \"role\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n } ],\r\n \"crossedThresholdInformation\" : {\r\n \"indicatorName\" : \"indicatorName\",\r\n \"@baseType\" : \"@baseType\",\r\n \"thresholdCrossingDescription\" : \"thresholdCrossingDescription\",\r\n \"granularity\" : \"granularity\",\r\n \"@type\" : \"@type\",\r\n \"observedValue\" : \"observedValue\",\r\n \"threshold\" : {\r\n \"@referredType\" : \"@referredType\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"name\" : \"name\",\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\"\r\n },\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"direction\" : \"direction\",\r\n \"indicatorUnit\" : \"indicatorUnit\"\r\n },\r\n \"@schemaLocation\" : \"@schemaLocation\",\r\n \"externalAlarmId\" : \"externalAlarmId\",\r\n \"clearSystemId\" : \"clearSystemId\",\r\n \"parentAlarm\" : [ null, null ],\r\n \"isRootCause\" : true,\r\n \"ackUserId\" : \"ackUserId\",\r\n \"clearUserId\" : \"clearUserId\",\r\n \"serviceAffecting\" : true,\r\n \"sourceSystemId\" : \"sourceSystemId\",\r\n \"ackState\" : \"ackState\",\r\n \"alarmType\" : \"alarmType\",\r\n \"specificProblem\" : \"specificProblem\",\r\n \"name\" : \"name\",\r\n \"plannedOutageIndicator\" : \"plannedOutageIndicator\",\r\n \"comment\" : [ {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n }, {\r\n \"systemId\" : \"systemId\",\r\n \"@baseType\" : \"@baseType\",\r\n \"@type\" : \"@type\",\r\n \"comment\" : \"comment\",\r\n \"time\" : \"2000-01-23T04:56:07.000+00:00\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"userId\" : \"userId\"\r\n } ],\r\n \"alarmDetails\" : \"alarmDetails\"\r\n } ],\r\n \"id\" : \"id\",\r\n \"href\" : \"href\",\r\n \"state\" : \"state\",\r\n \"@schemaLocation\" : \"http://example.com/aeiou\",\r\n \"alarmChangedTime\" : \"2000-01-23T04:56:07.000+00:00\"\r\n}", UnGroupAlarms.class), HttpStatus.NOT_IMPLEMENTED);
+ } catch (IOException e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+ } else {
+ log.warn("ObjectMapper or HttpServletRequest not configured in default UnGroupAlarmsApi interface so no example is generated");
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/api/UnGroupAlarmsApiController.java b/src/main/java/org/etsi/osl/tmf/am642/api/UnGroupAlarmsApiController.java
new file mode 100644
index 0000000000000000000000000000000000000000..edbc36b6ddfee89ee580224a61251b9d8666652c
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/api/UnGroupAlarmsApiController.java
@@ -0,0 +1,132 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.api;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.etsi.osl.tmf.am642.model.UnGroupAlarms;
+import org.etsi.osl.tmf.am642.model.UnGroupAlarmsCreate;
+import org.etsi.osl.tmf.am642.reposervices.UnGroupAlarmsRepoService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.Valid;
+@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2021-02-15T11:15:47.327930400+02:00[Europe/Athens]")
+@Controller
+@RequestMapping("/alarmManagement/v4/")
+public class UnGroupAlarmsApiController implements UnGroupAlarmsApi {
+
+ private final ObjectMapper objectMapper;
+
+ private final HttpServletRequest request;
+
+ private static final Logger log = LoggerFactory.getLogger(UnGroupAlarmsApiController.class);
+
+
+ @Autowired
+ UnGroupAlarmsRepoService UnGroupAlarmRepoService;
+
+
+ @org.springframework.beans.factory.annotation.Autowired
+ public UnGroupAlarmsApiController(ObjectMapper objectMapper, HttpServletRequest request) {
+ this.objectMapper = objectMapper;
+ this.request = request;
+ }
+
+ @Override
+ public Optional getObjectMapper() {
+ return Optional.ofNullable(objectMapper);
+ }
+
+ @Override
+ public Optional getRequest() {
+ return Optional.ofNullable(request);
+ }
+
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity createUnGroupAlarms(@Valid UnGroupAlarmsCreate body) {
+ try {
+
+ UnGroupAlarms c = UnGroupAlarmRepoService.addUnGroupAlarms(body);
+
+ return new ResponseEntity(c, HttpStatus.OK);
+ } catch (Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity retrieveUnGroupAlarms(String id, @Valid String fields) {
+ try {
+
+ return new ResponseEntity(UnGroupAlarmRepoService.findById(id), HttpStatus.OK);
+ } catch (Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+
+ @Override
+ @PreAuthorize("hasAnyAuthority('ROLE_ADMIN')" )
+ public ResponseEntity> listUnGroupAlarms(@Valid String fields, @Valid Integer offset,
+ @Valid Integer limit, Map allParams) {
+ try {
+ if (allParams != null) {
+ allParams.remove("fields");
+ allParams.remove("offset");
+ allParams.remove("limit");
+ } else {
+ allParams = new HashMap<>();
+ }
+ if ((fields == null) && (allParams.size() == 0)) {
+
+ String myfields = "lastUpdate,lifecycleStatus";
+ return new ResponseEntity>(UnGroupAlarmRepoService.findAll(myfields, allParams),
+ HttpStatus.OK);
+
+ } else {
+
+ return new ResponseEntity>(UnGroupAlarmRepoService.findAll(fields, allParams),
+ HttpStatus.OK);
+ }
+
+ } catch (Exception e) {
+ log.error("Couldn't serialize response for content type application/json", e);
+ return new ResponseEntity>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/repo/AckAlarmsRepository.java b/src/main/java/org/etsi/osl/tmf/am642/repo/AckAlarmsRepository.java
new file mode 100644
index 0000000000000000000000000000000000000000..d74a6737f0f9a7c5c9bff16be70f78b79954145a
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/repo/AckAlarmsRepository.java
@@ -0,0 +1,35 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.repo;
+
+import java.util.Optional;
+import org.etsi.osl.tmf.am642.model.AckAlarms;
+import org.springframework.data.repository.CrudRepository;
+import org.springframework.data.repository.PagingAndSortingRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface AckAlarmsRepository extends CrudRepository, PagingAndSortingRepository {
+
+
+ Optional findByUuid(String id);
+
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/repo/AlarmRepository.java b/src/main/java/org/etsi/osl/tmf/am642/repo/AlarmRepository.java
new file mode 100644
index 0000000000000000000000000000000000000000..fa5ecd44241806dfecb7e1956072d3d980d80c74
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/repo/AlarmRepository.java
@@ -0,0 +1,35 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.repo;
+
+import java.util.Optional;
+import org.etsi.osl.tmf.am642.model.Alarm;
+import org.springframework.data.repository.CrudRepository;
+import org.springframework.data.repository.PagingAndSortingRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface AlarmRepository extends CrudRepository,PagingAndSortingRepository {
+
+
+ Optional findByUuid(String id);
+
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/repo/ClearAlarmsRepository.java b/src/main/java/org/etsi/osl/tmf/am642/repo/ClearAlarmsRepository.java
new file mode 100644
index 0000000000000000000000000000000000000000..2d2c9579b55e98acedb542cb87783b39fa126f8d
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/repo/ClearAlarmsRepository.java
@@ -0,0 +1,35 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.repo;
+
+import java.util.Optional;
+import org.etsi.osl.tmf.am642.model.ClearAlarms;
+import org.springframework.data.repository.CrudRepository;
+import org.springframework.data.repository.PagingAndSortingRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface ClearAlarmsRepository extends CrudRepository, PagingAndSortingRepository {
+
+
+ Optional findByUuid(String id);
+
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/repo/CommentAlarmsRepository.java b/src/main/java/org/etsi/osl/tmf/am642/repo/CommentAlarmsRepository.java
new file mode 100644
index 0000000000000000000000000000000000000000..91e484e5ee2b6d4e32a7c157c750d2286003a2ee
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/repo/CommentAlarmsRepository.java
@@ -0,0 +1,35 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.repo;
+
+import java.util.Optional;
+import org.etsi.osl.tmf.am642.model.CommentAlarms;
+import org.springframework.data.repository.CrudRepository;
+import org.springframework.data.repository.PagingAndSortingRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface CommentAlarmsRepository extends CrudRepository, PagingAndSortingRepository {
+
+
+ Optional findByUuid(String id);
+
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/repo/GroupAlarmsRepository.java b/src/main/java/org/etsi/osl/tmf/am642/repo/GroupAlarmsRepository.java
new file mode 100644
index 0000000000000000000000000000000000000000..40bef51ecd1435caee21bb6d6133c15982fe6f63
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/repo/GroupAlarmsRepository.java
@@ -0,0 +1,35 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.repo;
+
+import java.util.Optional;
+import org.etsi.osl.tmf.am642.model.GroupAlarms;
+import org.springframework.data.repository.CrudRepository;
+import org.springframework.data.repository.PagingAndSortingRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface GroupAlarmsRepository extends CrudRepository, PagingAndSortingRepository {
+
+
+ Optional findByUuid(String id);
+
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/repo/UnAckAlarmsRepository.java b/src/main/java/org/etsi/osl/tmf/am642/repo/UnAckAlarmsRepository.java
new file mode 100644
index 0000000000000000000000000000000000000000..b24881c7f136ddf25cf128a1393f9295b8140b40
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/repo/UnAckAlarmsRepository.java
@@ -0,0 +1,35 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.repo;
+
+import java.util.Optional;
+import org.etsi.osl.tmf.am642.model.UnAckAlarms;
+import org.springframework.data.repository.CrudRepository;
+import org.springframework.data.repository.PagingAndSortingRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface UnAckAlarmsRepository extends CrudRepository, PagingAndSortingRepository {
+
+
+ Optional findByUuid(String id);
+
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/repo/UnGroupAlarmsRepository.java b/src/main/java/org/etsi/osl/tmf/am642/repo/UnGroupAlarmsRepository.java
new file mode 100644
index 0000000000000000000000000000000000000000..5aa830492fe71f3de27537f2f5a81ba0c25f52db
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/repo/UnGroupAlarmsRepository.java
@@ -0,0 +1,35 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.repo;
+
+import java.util.Optional;
+import org.etsi.osl.tmf.am642.model.UnGroupAlarms;
+import org.springframework.data.repository.CrudRepository;
+import org.springframework.data.repository.PagingAndSortingRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface UnGroupAlarmsRepository extends CrudRepository, PagingAndSortingRepository {
+
+
+ Optional findByUuid(String id);
+
+
+}
diff --git a/src/main/java/org/etsi/osl/tmf/am642/reposervices/AckAlarmsRepoService.java b/src/main/java/org/etsi/osl/tmf/am642/reposervices/AckAlarmsRepoService.java
new file mode 100644
index 0000000000000000000000000000000000000000..8bdc851c0523c5851bfe9d0b3e0381c8c0ab47a6
--- /dev/null
+++ b/src/main/java/org/etsi/osl/tmf/am642/reposervices/AckAlarmsRepoService.java
@@ -0,0 +1,167 @@
+/*-
+ * ========================LICENSE_START=================================
+ * org.etsi.osl.tmf.api
+ * %%
+ * Copyright (C) 2019 - 2021 openslice.io
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================LICENSE_END==================================
+ */
+package org.etsi.osl.tmf.am642.reposervices;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.nio.charset.StandardCharsets;
+import java.time.OffsetDateTime;
+import java.time.ZoneOffset;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import org.etsi.osl.tmf.am642.model.AckAlarms;
+import org.etsi.osl.tmf.am642.model.AckAlarmsCreate;
+import org.etsi.osl.tmf.am642.repo.AckAlarmsRepository;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.hibernate.transform.ResultTransformer;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import jakarta.persistence.EntityManagerFactory;
+import jakarta.validation.Valid;
+
+@Service
+public class AckAlarmsRepoService {
+
+ @Autowired
+ AckAlarmsRepository alRepo;
+
+ private SessionFactory sessionFactory;
+
+ @Autowired
+ public AckAlarmsRepoService(EntityManagerFactory factory) {
+ if (factory.unwrap(SessionFactory.class) == null) {
+ throw new NullPointerException("factory is not a hibernate factory");
+ }
+ this.sessionFactory = factory.unwrap(SessionFactory.class);
+ }
+
+ public AckAlarms addAckAlarm(@Valid AckAlarmsCreate ac) {
+ AckAlarms al = new AckAlarms();
+
+ al = updateFromAPICall( al , ac);
+ return this.alRepo.save( al );
+ }
+
+
+
+ public List findAll(String fields, Map allParams) throws UnsupportedEncodingException {
+ Session session = sessionFactory.openSession();
+ Transaction tx = session.beginTransaction();
+ List alist = null;
+ try {
+ String sql = "SELECT "
+ + "s.uuid as uuid,"
+ + "s.id as id,"
+ + "s.ackTime as ackTime,"
+ + "s.ackUserId as ackUserId,"
+ + "s.state as state";
+
+ if (fields != null) {
+ String[] field = fields.split(",");
+ for (String f : field) {
+ sql += ", s." + f + " as " + f ;
+ }
+
+ }
+ sql += " FROM AMAckAlarms s";
+ if (allParams.size() > 0) {
+ sql += " WHERE ";
+ for (String pname : allParams.keySet()) {
+ sql += " " + pname + " LIKE ";
+ String pval = URLDecoder.decode(allParams.get(pname), StandardCharsets.UTF_8.toString());
+ sql += "'" + pval + "'";
+ }
+
+ }
+ sql += " ORDER BY s.ackTime DESC";
+
+
+
+ List