Package com.oracle.bmc.internal
Class DefaultEndpointConfiguration
- java.lang.Object
-
- com.oracle.bmc.internal.DefaultEndpointConfiguration
-
public class DefaultEndpointConfiguration extends Object
DefaultEndpointConfiguration provides a way to construct the host endpoint for a service given a template and some variables based on the default Oracle Cloud Infrastructure naming convention.The available variables are: - {serviceEndpointPrefix} : The service prefix in the URL. - {region} : The public region id, ex, "us-phoenix-1". - {secondLevelDomain} : The second level domain associated with the Realm.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
build()
Builds the final endpoint based on the variables provided.static DefaultEndpointConfiguration
builder(String endpointTemplate)
Creates a new builder starting with the given template.DefaultEndpointConfiguration
endpointServiceName(String endpointServiceName)
Sets the endpoint service name, if one.DefaultEndpointConfiguration
regionId(String regionId)
Sets the regionId, if one.DefaultEndpointConfiguration
secondLevelDomain(String secondLevelDomain)
Sets the second level domain, if one.DefaultEndpointConfiguration
serviceEndpointPrefix(String serviceEndpointPrefix)
Sets the service endpoint prefix, if one.
-
-
-
Method Detail
-
builder
public static DefaultEndpointConfiguration builder(@Nonnull String endpointTemplate)
Creates a new builder starting with the given template.- Parameters:
endpointTemplate
- The template- Returns:
- A new builder.
-
serviceEndpointPrefix
public DefaultEndpointConfiguration serviceEndpointPrefix(String serviceEndpointPrefix)
Sets the service endpoint prefix, if one.- Parameters:
serviceEndpointPrefix
- The service endpoint prefix.- Returns:
- This builder
-
regionId
public DefaultEndpointConfiguration regionId(String regionId)
Sets the regionId, if one.- Parameters:
regionId
- The region id.- Returns:
- This builder
-
secondLevelDomain
public DefaultEndpointConfiguration secondLevelDomain(String secondLevelDomain)
Sets the second level domain, if one.- Parameters:
secondLevelDomain
- The second level domain of the Realm.- Returns:
- This builder
-
endpointServiceName
public DefaultEndpointConfiguration endpointServiceName(String endpointServiceName)
Sets the endpoint service name, if one.- Parameters:
endpointServiceName
- The endpoint service name.- Returns:
- This builder
-
build
public String build()
Builds the final endpoint based on the variables provided.- Returns:
- The endpoint.
-
-