| 1 |
.. |
| 2 |
Copyright 2014 IBM Corp. |
| 3 |
|
| 4 |
Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 5 |
not use this file except in compliance with the License. You may obtain |
| 6 |
a copy of the License at |
| 7 |
|
| 8 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
|
| 10 |
Unless required by applicable law or agreed to in writing, software |
| 11 |
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 12 |
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 |
License for the specific language governing permissions and limitations |
| 14 |
under the License. |
| 15 |
|
| 16 |
.. _attachments: |
| 17 |
|
| 18 |
============ |
| 19 |
Attachments |
| 20 |
============ |
| 21 |
|
| 22 |
An attachment is a container for data or "content" that may follow any |
| 23 |
structure - from an atomic type to a complex hierarchy. However, it is |
| 24 |
desirable for processing and interoperability that the type - or |
| 25 |
structure - of the content be identified by a simple value. To this end the |
| 26 |
attachment also contains a "content type", i.e., a URI that identifies the |
| 27 |
kind of content. |
| 28 |
|
| 29 |
Attachments are intended to be used for inclusion of domain-specific, |
| 30 |
informative, or descriptive information. |
| 31 |
|
| 32 |
=========== ========= ======== ====================================================================================== |
| 33 |
Property Type Required Description |
| 34 |
=========== ========= ======== ====================================================================================== |
| 35 |
typeURI xs:anyURI Yes The URI that identifies the type of data contained in the "content" property. |
| 36 |
content xs:any Yes A container that contains any type of data (as defined by the "contentType" property). |
| 37 |
contentType xs:string Yes An optional name that can be used to provide an identifying name for the content. |
| 38 |
=========== ========= ======== ====================================================================================== |
| 39 |
|
| 40 |
Serialisation |
| 41 |
============= |
| 42 |
|
| 43 |
.. code-block:: javascript |
| 44 |
|
| 45 |
{ |
| 46 |
"typeURI": "http://schemas.dmtf.org/cloud/audit/1.0/event", |
| 47 |
..., |
| 48 |
"attachments": [ |
| 49 |
{ |
| 50 |
"content": "xs:any", |
| 51 |
"contentType": "xs:anyURI" |
| 52 |
}, |
| 53 |
{ |
| 54 |
"content": "xs:any", |
| 55 |
"contentType": "xs:anyURI" |
| 56 |
} |
| 57 |
] |
| 58 |
} |