public static final class ResourceProps.Builder
extends java.lang.Object
ResourceProps
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
ResourceProps |
build()
Builds the configured instance.
|
ResourceProps.Builder |
defaultCorsPreflightOptions(CorsOptions defaultCorsPreflightOptions)
Sets the value of
ResourceOptions.getDefaultCorsPreflightOptions() |
ResourceProps.Builder |
defaultIntegration(Integration defaultIntegration)
Sets the value of
ResourceOptions.getDefaultIntegration() |
ResourceProps.Builder |
defaultMethodOptions(MethodOptions defaultMethodOptions)
Sets the value of
ResourceOptions.getDefaultMethodOptions() |
ResourceProps.Builder |
parent(IResource parent)
Sets the value of
ResourceProps.getParent() |
ResourceProps.Builder |
pathPart(java.lang.String pathPart)
Sets the value of
ResourceProps.getPathPart() |
public ResourceProps.Builder parent(IResource parent)
ResourceProps.getParent()
parent
- The parent resource of this resource. This parameter is required.
You can either pass another
Resource
object or a RestApi
object here.this
public ResourceProps.Builder pathPart(java.lang.String pathPart)
ResourceProps.getPathPart()
pathPart
- A path name for the resource. This parameter is required.this
public ResourceProps.Builder defaultCorsPreflightOptions(CorsOptions defaultCorsPreflightOptions)
ResourceOptions.getDefaultCorsPreflightOptions()
defaultCorsPreflightOptions
- Adds a CORS preflight OPTIONS method to this resource and all child resources.
You can add CORS at the resource-level using addCorsPreflight
.this
public ResourceProps.Builder defaultIntegration(Integration defaultIntegration)
ResourceOptions.getDefaultIntegration()
defaultIntegration
- An integration to use as a default for all methods created within this API unless an integration is specified.this
public ResourceProps.Builder defaultMethodOptions(MethodOptions defaultMethodOptions)
ResourceOptions.getDefaultMethodOptions()
defaultMethodOptions
- Method options to use as a default for all methods created within this API unless custom options are specified.this
public ResourceProps build()
ResourceProps
java.lang.NullPointerException
- if any required attribute was not provided