public class ApiTypeMapper extends Object implements IApiTypeMapper, ResourcePropertyKeys
IApiTypeMapper.IApiGroup, IApiTypeMapper.IVersionedApiResourceAPI_GROUPS_API, FWD_SLASH, KUBE_API, OS_APIANNOTATIONS, APIVERSION, CREATION_TIMESTAMP, FROM, KIND, LABELS, METADATA, METADATA_NAME, METADATA_NAMESPACE, METADATA_RESOURCE_VERSION, NAME, NAMESPACE, OBJECTS, PORTS, PROTOCOL, RESOURCE_VERSION, TYPE, VALUE| Constructor and Description |
|---|
ApiTypeMapper(String baseUrl,
okhttp3.OkHttpClient client) |
| Modifier and Type | Method and Description |
|---|---|
IApiTypeMapper.IVersionedApiResource |
getEndpointFor(String apiVersion,
String kind)
return the versioned endpoint for the given kind
|
String |
getPreferedVersionFor(String endpoint) |
boolean |
isSupported(IResource resource)
Using the kind and apiVersion, determine
if the cluster is able to consume the
given resource
|
boolean |
isSupported(String kind)
Using the kind determine
if the cluster is able to consume the
given resource
|
boolean |
isSupported(String version,
String kind)
Using the kind and apiVersion, determine
if the cluster is able to consume the
given resource
|
public ApiTypeMapper(String baseUrl, okhttp3.OkHttpClient client)
public String getPreferedVersionFor(String endpoint)
getPreferedVersionFor in interface IApiTypeMapperpublic boolean isSupported(IResource resource)
IApiTypeMapperisSupported in interface IApiTypeMapperpublic IApiTypeMapper.IVersionedApiResource getEndpointFor(String apiVersion, String kind)
IApiTypeMappergetEndpointFor in interface IApiTypeMapperpublic boolean isSupported(String kind)
IApiTypeMapperisSupported in interface IApiTypeMapperkind - the resource kindpublic boolean isSupported(String version, String kind)
IApiTypeMapperisSupported in interface IApiTypeMapperversion - the apiVersion, null or empty is best guesskind - the resource kindCopyright © 2018 Red Hat, Inc. All Rights Reserved.