Class ContentfulUserAgentHeaderInterceptor.Section
- java.lang.Object
-
- com.contentful.java.cda.interceptor.ContentfulUserAgentHeaderInterceptor.Section
-
- Enclosing class:
- ContentfulUserAgentHeaderInterceptor
public static class ContentfulUserAgentHeaderInterceptor.Section extends java.lang.ObjectA section of values used to fill out the Contentful custom HTTP header.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classContentfulUserAgentHeaderInterceptor.Section.OperatingSystemFixed enumeration of what operating systems we support.static classContentfulUserAgentHeaderInterceptor.Section.VersionDefines a version of this section.
-
Method Summary
-
-
-
Method Detail
-
integration
public static ContentfulUserAgentHeaderInterceptor.Section integration(java.lang.String name, ContentfulUserAgentHeaderInterceptor.Section.Version version)
Create an app section.- Parameters:
name- of the app.version- of the app.- Returns:
- a new Section.
-
sdk
public static ContentfulUserAgentHeaderInterceptor.Section sdk(java.lang.String name, ContentfulUserAgentHeaderInterceptor.Section.Version version)
Create an sdk section.- Parameters:
name- of the sdk.version- of the sdk.- Returns:
- a new Section.
-
platform
public static ContentfulUserAgentHeaderInterceptor.Section platform(java.lang.String name, ContentfulUserAgentHeaderInterceptor.Section.Version version)
Create an platform section.- Parameters:
name- of the platform.version- of the platform.- Returns:
- a new Section.
-
os
public static ContentfulUserAgentHeaderInterceptor.Section os(ContentfulUserAgentHeaderInterceptor.Section.OperatingSystem os, ContentfulUserAgentHeaderInterceptor.Section.Version version)
Create an os section.- Parameters:
os- one of the supported and understood operation systems.version- the version of the os.- Returns:
- a new Section.
-
app
public static ContentfulUserAgentHeaderInterceptor.Section app(java.lang.String name, ContentfulUserAgentHeaderInterceptor.Section.Version version)
Create an app section.- Parameters:
name- of the app.version- of the app.- Returns:
- a new Section or null, if app name is invalid.
-
getName
public java.lang.String getName()
- Returns:
- the name of this section.
-
getVersion
public ContentfulUserAgentHeaderInterceptor.Section.Version getVersion()
- Returns:
- the version of this section.
-
getIdentifier
public java.lang.String getIdentifier()
- Returns:
- which identifier this section uses.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- Returns:
- a string representing the section.
-
-