generated from AdobeDocs/dev-site-documentation-template
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-more feedback from pr and adding ContentType enum
- Loading branch information
1 parent
111fa55
commit 1e51d97
Showing
5 changed files
with
109 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
src/pages/edge/adobe-journey-optimizer/public-classes/content-type.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
title: ContentType | ||
description: Enum representing the ContentTypes used in schema-based objects. | ||
keywords: | ||
- Adobe Journey Optimizer | ||
- Messaging | ||
- iOS | ||
- Android | ||
- Proposition | ||
- Schema | ||
- ContentType | ||
- Content type | ||
--- | ||
|
||
import Tabs from './tabs/content-type.md' | ||
|
||
# Enum - ContentType | ||
|
||
Enum representing content types found within a schema object. | ||
|
||
## Definition | ||
|
||
<TabsBlock orientation="horizontal" slots="heading, content" repeat="2"/> | ||
|
||
Android | ||
|
||
<Tabs query="platform=android&function=enum"/> | ||
|
||
iOS | ||
|
||
<Tabs query="platform=ios&function=enum"/> | ||
|
||
## String values | ||
|
||
Below is the table of values returned by calling the `toString` method for each case: | ||
|
||
<TabsBlock orientation="horizontal" slots="heading, content" repeat="2"/> | ||
|
||
Android | ||
|
||
<Tabs query="platform=android&function=string-values"/> | ||
|
||
iOS | ||
|
||
<Tabs query="platform=ios&function=string-values"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
src/pages/edge/adobe-journey-optimizer/public-classes/tabs/content-type.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
noIndex: true | ||
--- | ||
|
||
<Variant platform="android" function="enum" repeat="2"/> | ||
|
||
#### Java | ||
|
||
```java | ||
public enum ContentType { | ||
APPLICATION_JSON(0), | ||
TEXT_HTML(1), | ||
TEXT_XML(2), | ||
TEXT_PLAIN(3), | ||
UNKNOWN(4); | ||
|
||
@Override | ||
public String toString(); | ||
} | ||
``` | ||
|
||
<Variant platform="ios" function="enum" repeat="2"/> | ||
|
||
#### Swift | ||
|
||
```swift | ||
@objc(AEPContentType) | ||
public enum ContentType: Int, Codable { | ||
case applicationJson = 0 | ||
case textHtml = 1 | ||
case textXml = 2 | ||
case textPlain = 3 | ||
case unknown = 4 | ||
|
||
public func toString() -> String | ||
} | ||
``` | ||
|
||
<Variant platform="android" function="string-values" repeat="1"/> | ||
|
||
| Case | String value | | ||
| ---- | ------------ | | ||
| `APPLICATION_JSON` | `application/json` | | ||
| `TEXT_HTML` | `text/html` | | ||
| `TEXT_XML` | `text/xml` | | ||
| `TEXT_PLAIN` | `text/plain` | | ||
| `UNKNOWN` | (empty string) | | ||
|
||
<Variant platform="ios" function="string-values" repeat="1"/> | ||
|
||
| Case | String value | | ||
| ---- | ------------ | | ||
| `.applicationJson` | `application/json` | | ||
| `.testHtml` | `text/html` | | ||
| `.textXml` | `text/xml` | | ||
| `.textPlain` | `text/plain` | | ||
| `.unknown` | (empty string) | |