package arn

import (
	

	
)

// AccessPointARN provides representation
type AccessPointARN struct {
	arn.ARN
	AccessPointName string
}

// GetARN returns the base ARN for the Access Point resource
func ( AccessPointARN) () arn.ARN {
	return .ARN
}

// ParseAccessPointResource attempts to parse the ARN's resource as an
// AccessPoint resource.
//
// Supported Access point resource format:
//   - Access point format: arn:{partition}:s3:{region}:{accountId}:accesspoint/{accesspointName}
//   - example: arn:aws:s3:us-west-2:012345678901:accesspoint/myaccesspoint
func ( arn.ARN,  []string) (AccessPointARN, error) {
	if isFIPS(.Region) {
		return AccessPointARN{}, InvalidARNError{ARN: , Reason: "FIPS region not allowed in ARN"}
	}
	if len(.AccountID) == 0 {
		return AccessPointARN{}, InvalidARNError{ARN: , Reason: "account-id not set"}
	}
	if len() == 0 {
		return AccessPointARN{}, InvalidARNError{ARN: , Reason: "resource-id not set"}
	}
	if len() > 1 {
		return AccessPointARN{}, InvalidARNError{ARN: , Reason: "sub resource not supported"}
	}

	 := [0]
	if len(strings.TrimSpace()) == 0 {
		return AccessPointARN{}, InvalidARNError{ARN: , Reason: "resource-id not set"}
	}

	return AccessPointARN{
		ARN:             ,
		AccessPointName: ,
	}, nil
}

func ( string) bool {
	return strings.HasPrefix(, "fips-") || strings.HasSuffix(, "-fips")
}