georoutes

package module
v1.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2025 License: Apache-2.0 Imports: 43 Imported by: 2

Documentation

Overview

Package georoutes provides the API client, operations, and parameter types for Amazon Location Service Routes V2.

With the Amazon Location Routes API you can calculate routes and estimate travel time based on up-to-date road network and live traffic information.

Calculate optimal travel routes and estimate travel times using up-to-date road network and traffic data. Key features include:

  • Point-to-point routing with estimated travel time, distance, and turn-by-turn directions

  • Multi-point route optimization to minimize travel time or distance

  • Route matrices for efficient multi-destination planning

  • Isoline calculations to determine reachable areas within specified time or distance thresholds

  • Map-matching to align GPS traces with the road network

Index

Constants

View Source
const ServiceAPIVersion = "2020-11-19"
View Source
const ServiceID = "Geo Routes"

Variables

This section is empty.

Functions

func NewDefaultEndpointResolver

func NewDefaultEndpointResolver() *internalendpoints.Resolver

NewDefaultEndpointResolver constructs a new service endpoint resolver

func WithAPIOptions

func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options)

WithAPIOptions returns a functional option for setting the Client's APIOptions option.

func WithEndpointResolver deprecated

func WithEndpointResolver(v EndpointResolver) func(*Options)

Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for this field will likely prevent you from using any endpoint-related service features released after the introduction of EndpointResolverV2 and BaseEndpoint.

To migrate an EndpointResolver implementation that uses a custom endpoint, set the client option BaseEndpoint instead.

func WithEndpointResolverV2

func WithEndpointResolverV2(v EndpointResolverV2) func(*Options)

WithEndpointResolverV2 returns a functional option for setting the Client's EndpointResolverV2 option.

func WithSigV4SigningName

func WithSigV4SigningName(name string) func(*Options)

WithSigV4SigningName applies an override to the authentication workflow to use the given signing name for SigV4-authenticated operations.

This is an advanced setting. The value here is FINAL, taking precedence over the resolved signing name from both auth scheme resolution and endpoint resolution.

func WithSigV4SigningRegion

func WithSigV4SigningRegion(region string) func(*Options)

WithSigV4SigningRegion applies an override to the authentication workflow to use the given signing region for SigV4-authenticated operations.

This is an advanced setting. The value here is FINAL, taking precedence over the resolved signing region from both auth scheme resolution and endpoint resolution.

Types

type AuthResolverParameters

type AuthResolverParameters struct {
	// The name of the operation being invoked.
	Operation string

	// The region in which the operation is being invoked.
	Region string
}

AuthResolverParameters contains the set of inputs necessary for auth scheme resolution.

type AuthSchemeResolver

type AuthSchemeResolver interface {
	ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error)
}

AuthSchemeResolver returns a set of possible authentication options for an operation.

type CalculateIsolinesInput

type CalculateIsolinesInput struct {

	// Threshold to be used for the isoline calculation. Up to 3 thresholds per
	// provided type can be requested.
	//
	// You incur a calculation charge for each threshold. Using a large amount of
	// thresholds in a request can lead you to incur unexpected charges. See [Amazon Location's pricing page]for more
	// information.
	//
	// [Amazon Location's pricing page]: https://docs.aws.amazon.com/location/latest/developerguide/routes-pricing.html`
	//
	// This member is required.
	Thresholds *types.IsolineThresholds

	// Features that are allowed while calculating an isoline.
	Allow *types.IsolineAllowOptions

	// Time of arrival at the destination.
	//
	// Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm
	//
	// Examples:
	//
	//     2020-04-22T17:57:24Z
	//
	//     2020-04-22T17:57:24+02:00
	ArrivalTime *string

	// Features that are avoided while calculating a route. Avoidance is on a
	// best-case basis. If an avoidance can't be satisfied for a particular case, it
	// violates the avoidance and the returned response produces a notice for the
	// violation.
	Avoid *types.IsolineAvoidanceOptions

	// Uses the current time as the time of departure.
	DepartNow *bool

	// Time of departure from thr origin.
	//
	// Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm
	//
	// Examples:
	//
	//     2020-04-22T17:57:24Z
	//
	//     2020-04-22T17:57:24+02:00
	DepartureTime *string

	// The final position for the route. In the World Geodetic System (WGS 84) format:
	// [longitude, latitude] .
	Destination []float64

	// Destination related options.
	DestinationOptions *types.IsolineDestinationOptions

	// The format of the returned IsolineGeometry.
	//
	// Default Value: FlexiblePolyline
	IsolineGeometryFormat types.GeometryFormat

	// Defines the granularity of the returned Isoline.
	IsolineGranularity *types.IsolineGranularityOptions

	// Optional: The API key to be used for authorization. Either an API key or valid
	// SigV4 signature must be provided when making a request.
	Key *string

	// Specifies the optimization criteria for when calculating an isoline.
	// AccurateCalculation generates an isoline of higher granularity that is more
	// precise. FastCalculation generates an isoline faster by reducing the
	// granularity, and in turn the quality of the isoline. BalancedCalculation
	// generates an isoline by balancing between quality and performance.
	//
	// Default Value: BalancedCalculation
	OptimizeIsolineFor types.IsolineOptimizationObjective

	// Specifies the optimization criteria for calculating a route.
	//
	// Default Value: FastestRoute
	OptimizeRoutingFor types.RoutingObjective

	// The start position for the route.
	Origin []float64

	// Origin related options.
	OriginOptions *types.IsolineOriginOptions

	// Traffic related options.
	Traffic *types.IsolineTrafficOptions

	// Specifies the mode of transport when calculating a route. Used in estimating
	// the speed of travel and road compatibility.
	//
	// The mode Scooter also applies to motorcycles, set to Scooter when wanted to
	// calculate options for motorcycles.
	//
	// Default Value: Car
	TravelMode types.IsolineTravelMode

	// Travel mode related options for the provided travel mode.
	TravelModeOptions *types.IsolineTravelModeOptions
	// contains filtered or unexported fields
}

type CalculateIsolinesOutput

type CalculateIsolinesOutput struct {

	// The format of the returned IsolineGeometry.
	//
	// Default Value: FlexiblePolyline
	//
	// This member is required.
	IsolineGeometryFormat types.GeometryFormat

	// Calculated isolines and associated properties.
	//
	// This member is required.
	Isolines []types.Isoline

	// The pricing bucket for which the query is charged at.
	//
	// This member is required.
	PricingBucket *string

	// Time of arrival at the destination. This parameter is returned only if the
	// Destination parameters was provided in the request.
	//
	// Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm
	//
	// Examples:
	//
	//     2020-04-22T17:57:24Z
	//
	//     2020-04-22T17:57:24+02:00
	ArrivalTime *string

	// Time of departure from thr origin.
	//
	// Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm
	//
	// Examples:
	//
	//     2020-04-22T17:57:24Z
	//
	//     2020-04-22T17:57:24+02:00
	DepartureTime *string

	// Snapped destination that was used for the Isoline calculation.
	SnappedDestination []float64

	// Snapped origin that was used for the Isoline calculation.
	SnappedOrigin []float64

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type CalculateRouteMatrixInput

type CalculateRouteMatrixInput struct {

	// List of destinations for the route.
	//
	// Route calculations are billed for each origin and destination pair. If you use
	// a large matrix of origins and destinations, your costs will increase
	// accordingly. See [Amazon Location's pricing page]for more information.
	//
	// [Amazon Location's pricing page]: https://docs.aws.amazon.com/location/latest/developerguide/routes-pricing.html`
	//
	// This member is required.
	Destinations []types.RouteMatrixDestination

	// The position in longitude and latitude for the origin.
	//
	// Route calculations are billed for each origin and destination pair. Using a
	// large amount of Origins in a request can lead you to incur unexpected charges.
	// See [Amazon Location's pricing page]for more information.
	//
	// [Amazon Location's pricing page]: https://docs.aws.amazon.com/location/latest/developerguide/routes-pricing.html`
	//
	// This member is required.
	Origins []types.RouteMatrixOrigin

	// Boundary within which the matrix is to be calculated. All data, origins and
	// destinations outside the boundary are considered invalid.
	//
	// When request routing boundary was set as AutoCircle, the response routing
	// boundary will return Circle derived from the AutoCircle settings.
	//
	// This member is required.
	RoutingBoundary *types.RouteMatrixBoundary

	// Features that are allowed while calculating a route.
	Allow *types.RouteMatrixAllowOptions

	// Features that are avoided while calculating a route. Avoidance is on a
	// best-case basis. If an avoidance can't be satisfied for a particular case, it
	// violates the avoidance and the returned response produces a notice for the
	// violation.
	Avoid *types.RouteMatrixAvoidanceOptions

	// Uses the current time as the time of departure.
	DepartNow *bool

	// Time of departure from thr origin.
	//
	// Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm
	//
	// Examples:
	//
	//     2020-04-22T17:57:24Z
	//
	//     2020-04-22T17:57:24+02:00
	DepartureTime *string

	// Features to be strictly excluded while calculating the route.
	Exclude *types.RouteMatrixExclusionOptions

	// Optional: The API key to be used for authorization. Either an API key or valid
	// SigV4 signature must be provided when making a request.
	Key *string

	// Specifies the optimization criteria for calculating a route.
	//
	// Default Value: FastestRoute
	OptimizeRoutingFor types.RoutingObjective

	// Traffic related options.
	Traffic *types.RouteMatrixTrafficOptions

	// Specifies the mode of transport when calculating a route. Used in estimating
	// the speed of travel and road compatibility.
	//
	// Default Value: Car
	TravelMode types.RouteMatrixTravelMode

	// Travel mode related options for the provided travel mode.
	TravelModeOptions *types.RouteMatrixTravelModeOptions
	// contains filtered or unexported fields
}

type CalculateRouteMatrixOutput

type CalculateRouteMatrixOutput struct {

	// The count of error results in the route matrix. If this number is 0, all routes
	// were calculated successfully.
	//
	// This member is required.
	ErrorCount *int32

	// The pricing bucket for which the query is charged at.
	//
	// This member is required.
	PricingBucket *string

	// The calculated route matrix containing the results for all pairs of Origins to
	// Destination positions. Each row corresponds to one entry in Origins. Each entry
	// in the row corresponds to the route from that entry in Origins to an entry in
	// Destination positions.
	//
	// This member is required.
	RouteMatrix [][]types.RouteMatrixEntry

	// Boundary within which the matrix is to be calculated. All data, origins and
	// destinations outside the boundary are considered invalid.
	//
	// When request routing boundary was set as AutoCircle, the response routing
	// boundary will return Circle derived from the AutoCircle settings.
	//
	// This member is required.
	RoutingBoundary *types.RouteMatrixBoundary

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type CalculateRoutesInput

type CalculateRoutesInput struct {

	// The final position for the route. In the World Geodetic System (WGS 84) format:
	// [longitude, latitude] .
	//
	// This member is required.
	Destination []float64

	// The start position for the route.
	//
	// This member is required.
	Origin []float64

	// Features that are allowed while calculating a route.
	Allow *types.RouteAllowOptions

	// Time of arrival at the destination.
	//
	// Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm
	//
	// Examples:
	//
	//     2020-04-22T17:57:24Z
	//
	//     2020-04-22T17:57:24+02:00
	ArrivalTime *string

	// Features that are avoided while calculating a route. Avoidance is on a
	// best-case basis. If an avoidance can't be satisfied for a particular case, it
	// violates the avoidance and the returned response produces a notice for the
	// violation.
	Avoid *types.RouteAvoidanceOptions

	// Uses the current time as the time of departure.
	DepartNow *bool

	// Time of departure from thr origin.
	//
	// Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm
	//
	// Examples:
	//
	//     2020-04-22T17:57:24Z
	//
	//     2020-04-22T17:57:24+02:00
	DepartureTime *string

	// Destination related options.
	DestinationOptions *types.RouteDestinationOptions

	// Driver related options.
	Driver *types.RouteDriverOptions

	// Features to be strictly excluded while calculating the route.
	Exclude *types.RouteExclusionOptions

	// Measurement system to be used for instructions within steps in the response.
	InstructionsMeasurementSystem types.MeasurementSystem

	// Optional: The API key to be used for authorization. Either an API key or valid
	// SigV4 signature must be provided when making a request.
	Key *string

	// List of languages for instructions within steps in the response.
	//
	// Instructions in the requested language are returned only if they are available.
	Languages []string

	// A list of optional additional parameters such as timezone that can be requested
	// for each result.
	//
	//   - Elevation : Retrieves the elevation information for each location.
	//
	//   - Incidents : Provides information on traffic incidents along the route.
	//
	//   - PassThroughWaypoints : Indicates waypoints that are passed through without
	//   stopping.
	//
	//   - Summary : Returns a summary of the route, including distance and duration.
	//
	//   - Tolls : Supplies toll cost information along the route.
	//
	//   - TravelStepInstructions : Provides step-by-step instructions for travel along
	//   the route.
	//
	//   - TruckRoadTypes : Returns information about road types suitable for trucks.
	//
	//   - TypicalDuration : Gives typical travel duration based on historical data.
	//
	//   - Zones : Specifies the time zone information for each waypoint.
	LegAdditionalFeatures []types.RouteLegAdditionalFeature

	// Specifies the format of the geometry returned for each leg of the route. You
	// can choose between two different geometry encoding formats.
	//
	// FlexiblePolyline : A compact and precise encoding format for the leg geometry.
	// For more information on the format, see the GitHub repository for [FlexiblePolyline]
	// FlexiblePolyline .
	//
	// Simple : A less compact encoding, which is easier to decode but may be less
	// precise and result in larger payloads.
	//
	// [FlexiblePolyline]: https://github.com/heremaps/flexible-polyline
	LegGeometryFormat types.GeometryFormat

	// Maximum number of alternative routes to be provided in the response, if
	// available.
	MaxAlternatives *int32

	// Specifies the optimization criteria for calculating a route.
	//
	// Default Value: FastestRoute
	OptimizeRoutingFor types.RoutingObjective

	// Origin related options.
	OriginOptions *types.RouteOriginOptions

	// A list of optional features such as SpeedLimit that can be requested for a
	// Span. A span is a section of a Leg for which the requested features have the
	// same values.
	SpanAdditionalFeatures []types.RouteSpanAdditionalFeature

	// Toll related options.
	Tolls *types.RouteTollOptions

	// Traffic related options.
	Traffic *types.RouteTrafficOptions

	// Specifies the mode of transport when calculating a route. Used in estimating
	// the speed of travel and road compatibility.
	//
	// Default Value: Car
	TravelMode types.RouteTravelMode

	// Travel mode related options for the provided travel mode.
	TravelModeOptions *types.RouteTravelModeOptions

	// Type of step returned by the response. Default provides basic steps intended
	// for web based applications. TurnByTurn provides detailed instructions with more
	// granularity intended for a turn based navigation system.
	TravelStepType types.RouteTravelStepType

	// List of waypoints between the Origin and Destination.
	Waypoints []types.RouteWaypoint
	// contains filtered or unexported fields
}

type CalculateRoutesOutput

type CalculateRoutesOutput struct {

	// Specifies the format of the geometry returned for each leg of the route.
	//
	// This member is required.
	LegGeometryFormat types.GeometryFormat

	// Notices are additional information returned that indicate issues that occurred
	// during route calculation.
	//
	// This member is required.
	Notices []types.RouteResponseNotice

	// The pricing bucket for which the query is charged at.
	//
	// This member is required.
	PricingBucket *string

	// The path from the origin to the destination.
	//
	// This member is required.
	Routes []types.Route

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides the API client to make operations call for Amazon Location Service Routes V2.

func New

func New(options Options, optFns ...func(*Options)) *Client

New returns an initialized Client based on the functional options. Provide additional functional options to further configure the behavior of the client, such as changing the client's endpoint or adding custom middleware behavior.

func NewFromConfig

func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client

NewFromConfig returns a new client from the provided config.

func (*Client) CalculateIsolines

func (c *Client) CalculateIsolines(ctx context.Context, params *CalculateIsolinesInput, optFns ...func(*Options)) (*CalculateIsolinesOutput, error)

Use the CalculateIsolines action to find service areas that can be reached in a given threshold of time, distance.

func (*Client) CalculateRouteMatrix

func (c *Client) CalculateRouteMatrix(ctx context.Context, params *CalculateRouteMatrixInput, optFns ...func(*Options)) (*CalculateRouteMatrixOutput, error)
Use CalculateRouteMatrix to compute results for all pairs of Origins to

Destinations. Each row corresponds to one entry in Origins. Each entry in the row corresponds to the route from that entry in Origins to an entry in Destinations positions.

func (*Client) CalculateRoutes

func (c *Client) CalculateRoutes(ctx context.Context, params *CalculateRoutesInput, optFns ...func(*Options)) (*CalculateRoutesOutput, error)

CalculateRoutes computes routes given the following required parameters: Origin and Destination .

func (*Client) OptimizeWaypoints

func (c *Client) OptimizeWaypoints(ctx context.Context, params *OptimizeWaypointsInput, optFns ...func(*Options)) (*OptimizeWaypointsOutput, error)

OptimizeWaypoints calculates the optimal order to travel between a set of waypoints to minimize either the travel time or the distance travelled during the journey, based on road network restrictions and the traffic pattern data.

func (*Client) Options

func (c *Client) Options() Options

Options returns a copy of the client configuration.

Callers SHOULD NOT perform mutations on any inner structures within client config. Config overrides should instead be made on a per-operation basis through functional options.

func (*Client) SnapToRoads

func (c *Client) SnapToRoads(ctx context.Context, params *SnapToRoadsInput, optFns ...func(*Options)) (*SnapToRoadsOutput, error)

SnapToRoads matches GPS trace to roads most likely traveled on.

type EndpointParameters

type EndpointParameters struct {
	// When true, use the dual-stack endpoint. If the configured endpoint does not
	// support dual-stack, dispatching the request MAY return an error.
	//
	// Defaults to
	// false if no value is provided.
	//
	// AWS::UseDualStack
	UseDualStack *bool

	// When true, send this request to the FIPS-compliant regional endpoint. If the
	// configured endpoint does not have a FIPS compliant endpoint, dispatching the
	// request will return an error.
	//
	// Defaults to false if no value is
	// provided.
	//
	// AWS::UseFIPS
	UseFIPS *bool

	// Override the endpoint used to send this request
	//
	// Parameter is
	// required.
	//
	// SDK::Endpoint
	Endpoint *string

	// The AWS region used to dispatch the request.
	//
	// Parameter is
	// required.
	//
	// AWS::Region
	Region *string
}

EndpointParameters provides the parameters that influence how endpoints are resolved.

func (EndpointParameters) ValidateRequired

func (p EndpointParameters) ValidateRequired() error

ValidateRequired validates required parameters are set.

func (EndpointParameters) WithDefaults

func (p EndpointParameters) WithDefaults() EndpointParameters

WithDefaults returns a shallow copy of EndpointParameterswith default values applied to members where applicable.

type EndpointResolver

type EndpointResolver interface {
	ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
}

EndpointResolver interface for resolving service endpoints.

func EndpointResolverFromURL

func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver

EndpointResolverFromURL returns an EndpointResolver configured using the provided endpoint url. By default, the resolved endpoint resolver uses the client region as signing region, and the endpoint source is set to EndpointSourceCustom.You can provide functional options to configure endpoint values for the resolved endpoint.

type EndpointResolverFunc

type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)

EndpointResolverFunc is a helper utility that wraps a function so it satisfies the EndpointResolver interface. This is useful when you want to add additional endpoint resolving logic, or stub out specific endpoints with custom values.

func (EndpointResolverFunc) ResolveEndpoint

func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error)

type EndpointResolverOptions

type EndpointResolverOptions = internalendpoints.Options

EndpointResolverOptions is the service endpoint resolver options

type EndpointResolverV2

type EndpointResolverV2 interface {
	// ResolveEndpoint attempts to resolve the endpoint with the provided options,
	// returning the endpoint if found. Otherwise an error is returned.
	ResolveEndpoint(ctx context.Context, params EndpointParameters) (
		smithyendpoints.Endpoint, error,
	)
}

EndpointResolverV2 provides the interface for resolving service endpoints.

func NewDefaultEndpointResolverV2

func NewDefaultEndpointResolverV2() EndpointResolverV2

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type HTTPSignerV4

type HTTPSignerV4 interface {
	SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
}

type OptimizeWaypointsInput

type OptimizeWaypointsInput struct {

	// The start position for the route.
	//
	// This member is required.
	Origin []float64

	// Features that are avoided. Avoidance is on a best-case basis. If an avoidance
	// can't be satisfied for a particular case, this setting is ignored.
	Avoid *types.WaypointOptimizationAvoidanceOptions

	// Clustering allows you to specify how nearby waypoints can be clustered to
	// improve the optimized sequence.
	Clustering *types.WaypointOptimizationClusteringOptions

	// Departure time from the waypoint.
	//
	// Time format: YYYY-MM-DDThh:mm:ss.sssZ | YYYY-MM-DDThh:mm:ss.sss+hh:mm
	//
	// Examples:
	//
	//     2020-04-22T17:57:24Z
	//
	//     2020-04-22T17:57:24+02:00
	DepartureTime *string

	// The final position for the route in the World Geodetic System (WGS 84) format:
	// [longitude, latitude] .
	Destination []float64

	// Destination related options.
	DestinationOptions *types.WaypointOptimizationDestinationOptions

	// Driver related options.
	Driver *types.WaypointOptimizationDriverOptions

	// Features to be strictly excluded while calculating the route.
	Exclude *types.WaypointOptimizationExclusionOptions

	// Optional: The API key to be used for authorization. Either an API key or valid
	// SigV4 signature must be provided when making a request.
	Key *string

	// Specifies the optimization criteria for the calculated sequence.
	//
	// Default Value: FastestRoute .
	OptimizeSequencingFor types.WaypointOptimizationSequencingObjective

	// Origin related options.
	OriginOptions *types.WaypointOptimizationOriginOptions

	// Traffic-related options.
	Traffic *types.WaypointOptimizationTrafficOptions

	// Specifies the mode of transport when calculating a route. Used in estimating
	// the speed of travel and road compatibility.
	//
	// Default Value: Car
	TravelMode types.WaypointOptimizationTravelMode

	// Travel mode related options for the provided travel mode.
	TravelModeOptions *types.WaypointOptimizationTravelModeOptions

	// List of waypoints between the Origin and Destination .
	Waypoints []types.WaypointOptimizationWaypoint
	// contains filtered or unexported fields
}

type OptimizeWaypointsOutput

type OptimizeWaypointsOutput struct {

	// Details about the connection from one waypoint to the next, within the
	// optimized sequence.
	//
	// This member is required.
	Connections []types.WaypointOptimizationConnection

	// Overall distance to travel the whole sequence.
	//
	// This member is required.
	Distance int64

	// Overall duration to travel the whole sequence.
	//
	// Unit: seconds
	//
	// This member is required.
	Duration int64

	// Returns waypoints that caused the optimization problem to fail, and the
	// constraints that were unsatisfied leading to the failure.
	//
	// This member is required.
	ImpedingWaypoints []types.WaypointOptimizationImpedingWaypoint

	// Waypoints in the order of the optimized sequence.
	//
	// This member is required.
	OptimizedWaypoints []types.WaypointOptimizationOptimizedWaypoint

	// The pricing bucket for which the query is charged at.
	//
	// This member is required.
	PricingBucket *string

	// Time breakdown for the sequence.
	//
	// This member is required.
	TimeBreakdown *types.WaypointOptimizationTimeBreakdown

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type Options

type Options struct {
	// Set of options to modify how an operation is invoked. These apply to all
	// operations invoked for this client. Use functional options on operation call to
	// modify this list for per operation behavior.
	APIOptions []func(*middleware.Stack) error

	// The optional application specific identifier appended to the User-Agent header.
	AppID string

	// This endpoint will be given as input to an EndpointResolverV2. It is used for
	// providing a custom base endpoint that is subject to modifications by the
	// processing EndpointResolverV2.
	BaseEndpoint *string

	// Configures the events that will be sent to the configured logger.
	ClientLogMode aws.ClientLogMode

	// The credentials object to use when signing requests.
	Credentials aws.CredentialsProvider

	// The configuration DefaultsMode that the SDK should use when constructing the
	// clients initial default settings.
	DefaultsMode aws.DefaultsMode

	// The endpoint options to be used when attempting to resolve an endpoint.
	EndpointOptions EndpointResolverOptions

	// The service endpoint resolver.
	//
	// Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a
	// value for this field will likely prevent you from using any endpoint-related
	// service features released after the introduction of EndpointResolverV2 and
	// BaseEndpoint.
	//
	// To migrate an EndpointResolver implementation that uses a custom endpoint, set
	// the client option BaseEndpoint instead.
	EndpointResolver EndpointResolver

	// Resolves the endpoint used for a particular service operation. This should be
	// used over the deprecated EndpointResolver.
	EndpointResolverV2 EndpointResolverV2

	// Signature Version 4 (SigV4) Signer
	HTTPSignerV4 HTTPSignerV4

	// The logger writer interface to write logging messages to.
	Logger logging.Logger

	// The client meter provider.
	MeterProvider metrics.MeterProvider

	// The region to send requests to. (Required)
	Region string

	// RetryMaxAttempts specifies the maximum number attempts an API client will call
	// an operation that fails with a retryable error. A value of 0 is ignored, and
	// will not be used to configure the API client created default retryer, or modify
	// per operation call's retry max attempts.
	//
	// If specified in an operation call's functional options with a value that is
	// different than the constructed client's Options, the Client's Retryer will be
	// wrapped to use the operation's specific RetryMaxAttempts value.
	RetryMaxAttempts int

	// RetryMode specifies the retry mode the API client will be created with, if
	// Retryer option is not also specified.
	//
	// When creating a new API Clients this member will only be used if the Retryer
	// Options member is nil. This value will be ignored if Retryer is not nil.
	//
	// Currently does not support per operation call overrides, may in the future.
	RetryMode aws.RetryMode

	// Retryer guides how HTTP requests should be retried in case of recoverable
	// failures. When nil the API client will use a default retryer. The kind of
	// default retry created by the API client can be changed with the RetryMode
	// option.
	Retryer aws.Retryer

	// The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
	// to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You
	// should not populate this structure programmatically, or rely on the values here
	// within your applications.
	RuntimeEnvironment aws.RuntimeEnvironment

	// The client tracer provider.
	TracerProvider tracing.TracerProvider

	// The HTTP client to invoke API calls with. Defaults to client's default HTTP
	// implementation if nil.
	HTTPClient HTTPClient

	// The auth scheme resolver which determines how to authenticate for each
	// operation.
	AuthSchemeResolver AuthSchemeResolver

	// The list of auth schemes supported by the client.
	AuthSchemes []smithyhttp.AuthScheme
	// contains filtered or unexported fields
}

func (Options) Copy

func (o Options) Copy() Options

Copy creates a clone where the APIOptions list is deep copied.

func (Options) GetIdentityResolver

func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver

type ResolveEndpoint

type ResolveEndpoint struct {
	Resolver EndpointResolver
	Options  EndpointResolverOptions
}

func (*ResolveEndpoint) HandleSerialize

func (*ResolveEndpoint) ID

func (*ResolveEndpoint) ID() string

type SnapToRoadsInput

type SnapToRoadsInput struct {

	// List of trace points to be snapped onto the road network.
	//
	// This member is required.
	TracePoints []types.RoadSnapTracePoint

	// Optional: The API key to be used for authorization. Either an API key or valid
	// SigV4 signature must be provided when making a request.
	Key *string

	// The radius around the provided tracepoint that is considered for snapping.
	//
	// Unit: meters
	//
	// Default value: 300
	SnapRadius int64

	// Chooses what the returned SnappedGeometry format should be.
	//
	// Default Value: FlexiblePolyline
	SnappedGeometryFormat types.GeometryFormat

	// Specifies the mode of transport when calculating a route. Used in estimating
	// the speed of travel and road compatibility.
	//
	// Default Value: Car
	TravelMode types.RoadSnapTravelMode

	// Travel mode related options for the provided travel mode.
	TravelModeOptions *types.RoadSnapTravelModeOptions
	// contains filtered or unexported fields
}

type SnapToRoadsOutput

type SnapToRoadsOutput struct {

	// Notices are additional information returned that indicate issues that occurred
	// during route calculation.
	//
	// This member is required.
	Notices []types.RoadSnapNotice

	// The pricing bucket for which the query is charged at.
	//
	// This member is required.
	PricingBucket *string

	// Specifies the format of the geometry returned for each leg of the route.
	//
	// This member is required.
	SnappedGeometryFormat types.GeometryFormat

	// The trace points snapped onto the road network.
	//
	// This member is required.
	SnappedTracePoints []types.RoadSnapSnappedTracePoint

	// The interpolated geometry for the snapped route onto the road network.
	SnappedGeometry *types.RoadSnapSnappedGeometry

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL