summaryrefslogtreecommitdiff
path: root/vendor/github.com/aws/smithy-go/transport/http/properties.go
blob: c65aa393201526d82972ab40029938b3423fd575 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
package http

import smithy "github.com/aws/smithy-go"

type (
	sigV4SigningNameKey   struct{}
	sigV4SigningRegionKey struct{}

	sigV4ASigningNameKey    struct{}
	sigV4ASigningRegionsKey struct{}

	isUnsignedPayloadKey     struct{}
	disableDoubleEncodingKey struct{}
)

// GetSigV4SigningName gets the signing name from Properties.
func GetSigV4SigningName(p *smithy.Properties) (string, bool) {
	v, ok := p.Get(sigV4SigningNameKey{}).(string)
	return v, ok
}

// SetSigV4SigningName sets the signing name on Properties.
func SetSigV4SigningName(p *smithy.Properties, name string) {
	p.Set(sigV4SigningNameKey{}, name)
}

// GetSigV4SigningRegion gets the signing region from Properties.
func GetSigV4SigningRegion(p *smithy.Properties) (string, bool) {
	v, ok := p.Get(sigV4SigningRegionKey{}).(string)
	return v, ok
}

// SetSigV4SigningRegion sets the signing region on Properties.
func SetSigV4SigningRegion(p *smithy.Properties, region string) {
	p.Set(sigV4SigningRegionKey{}, region)
}

// GetSigV4ASigningName gets the v4a signing name from Properties.
func GetSigV4ASigningName(p *smithy.Properties) (string, bool) {
	v, ok := p.Get(sigV4ASigningNameKey{}).(string)
	return v, ok
}

// SetSigV4ASigningName sets the signing name on Properties.
func SetSigV4ASigningName(p *smithy.Properties, name string) {
	p.Set(sigV4ASigningNameKey{}, name)
}

// GetSigV4ASigningRegion gets the v4a signing region set from Properties.
func GetSigV4ASigningRegions(p *smithy.Properties) ([]string, bool) {
	v, ok := p.Get(sigV4ASigningRegionsKey{}).([]string)
	return v, ok
}

// SetSigV4ASigningRegions sets the v4a signing region set on Properties.
func SetSigV4ASigningRegions(p *smithy.Properties, regions []string) {
	p.Set(sigV4ASigningRegionsKey{}, regions)
}

// GetIsUnsignedPayload gets whether the payload is unsigned from Properties.
func GetIsUnsignedPayload(p *smithy.Properties) (bool, bool) {
	v, ok := p.Get(isUnsignedPayloadKey{}).(bool)
	return v, ok
}

// SetIsUnsignedPayload sets whether the payload is unsigned on Properties.
func SetIsUnsignedPayload(p *smithy.Properties, isUnsignedPayload bool) {
	p.Set(isUnsignedPayloadKey{}, isUnsignedPayload)
}

// GetDisableDoubleEncoding gets whether the payload is unsigned from Properties.
func GetDisableDoubleEncoding(p *smithy.Properties) (bool, bool) {
	v, ok := p.Get(disableDoubleEncodingKey{}).(bool)
	return v, ok
}

// SetDisableDoubleEncoding sets whether the payload is unsigned on Properties.
func SetDisableDoubleEncoding(p *smithy.Properties, disableDoubleEncoding bool) {
	p.Set(disableDoubleEncodingKey{}, disableDoubleEncoding)
}