1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package location
4
5import (
6	"context"
7	awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
8	"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
9	"github.com/aws/aws-sdk-go-v2/service/location/types"
10	"github.com/aws/smithy-go/middleware"
11	smithyhttp "github.com/aws/smithy-go/transport/http"
12	"time"
13)
14
15// Retrieves the geofence collection details.
16func (c *Client) DescribeGeofenceCollection(ctx context.Context, params *DescribeGeofenceCollectionInput, optFns ...func(*Options)) (*DescribeGeofenceCollectionOutput, error) {
17	if params == nil {
18		params = &DescribeGeofenceCollectionInput{}
19	}
20
21	result, metadata, err := c.invokeOperation(ctx, "DescribeGeofenceCollection", params, optFns, addOperationDescribeGeofenceCollectionMiddlewares)
22	if err != nil {
23		return nil, err
24	}
25
26	out := result.(*DescribeGeofenceCollectionOutput)
27	out.ResultMetadata = metadata
28	return out, nil
29}
30
31type DescribeGeofenceCollectionInput struct {
32
33	// The name of the geofence collection.
34	//
35	// This member is required.
36	CollectionName *string
37}
38
39type DescribeGeofenceCollectionOutput struct {
40
41	// The Amazon Resource Name (ARN) for the geofence collection resource. Used when
42	// you need to specify a resource across all AWS.
43	//
44	// This member is required.
45	CollectionArn *string
46
47	// The name of the geofence collection.
48	//
49	// This member is required.
50	CollectionName *string
51
52	// The timestamp for when the geofence resource was created in ISO 8601
53	// (https://www.iso.org/iso-8601-date-and-time-format.html) format:
54	// YYYY-MM-DDThh:mm:ss.sssZ
55	//
56	// This member is required.
57	CreateTime *time.Time
58
59	// The optional description for the geofence collection.
60	//
61	// This member is required.
62	Description *string
63
64	// The pricing plan selected for the specified geofence collection. For additional
65	// details and restrictions on each pricing plan option, see the Amazon Location
66	// Service pricing page (https://aws.amazon.com/location/pricing/).
67	//
68	// This member is required.
69	PricingPlan types.PricingPlan
70
71	// The timestamp for when the geofence collection was last updated in ISO 8601
72	// (https://www.iso.org/iso-8601-date-and-time-format.html) format:
73	// YYYY-MM-DDThh:mm:ss.sssZ
74	//
75	// This member is required.
76	UpdateTime *time.Time
77
78	// The data source selected for the geofence collection and associated pricing
79	// plan.
80	PricingPlanDataSource *string
81
82	// Metadata pertaining to the operation's result.
83	ResultMetadata middleware.Metadata
84}
85
86func addOperationDescribeGeofenceCollectionMiddlewares(stack *middleware.Stack, options Options) (err error) {
87	err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeGeofenceCollection{}, middleware.After)
88	if err != nil {
89		return err
90	}
91	err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeGeofenceCollection{}, middleware.After)
92	if err != nil {
93		return err
94	}
95	if err = addSetLoggerMiddleware(stack, options); err != nil {
96		return err
97	}
98	if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
99		return err
100	}
101	if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
102		return err
103	}
104	if err = addResolveEndpointMiddleware(stack, options); err != nil {
105		return err
106	}
107	if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
108		return err
109	}
110	if err = addRetryMiddlewares(stack, options); err != nil {
111		return err
112	}
113	if err = addHTTPSignerV4Middleware(stack, options); err != nil {
114		return err
115	}
116	if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
117		return err
118	}
119	if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
120		return err
121	}
122	if err = addClientUserAgent(stack); err != nil {
123		return err
124	}
125	if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
126		return err
127	}
128	if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
129		return err
130	}
131	if err = addOpDescribeGeofenceCollectionValidationMiddleware(stack); err != nil {
132		return err
133	}
134	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
135		return err
136	}
137	if err = addResponseErrorMiddleware(stack); err != nil {
138		return err
139	}
140	if err = addRequestResponseLogging(stack, options); err != nil {
141		return err
142	}
143	return nil
144}
145