from_ptr.go

  1// Code generated by aws/generate.go DO NOT EDIT.
  2
  3package aws
  4
  5import (
  6	"github.com/aws/smithy-go/ptr"
  7	"time"
  8)
  9
 10// ToBool returns bool value dereferenced if the passed
 11// in pointer was not nil. Returns a bool zero value if the
 12// pointer was nil.
 13func ToBool(p *bool) (v bool) {
 14	return ptr.ToBool(p)
 15}
 16
 17// ToBoolSlice returns a slice of bool values, that are
 18// dereferenced if the passed in pointer was not nil. Returns a bool
 19// zero value if the pointer was nil.
 20func ToBoolSlice(vs []*bool) []bool {
 21	return ptr.ToBoolSlice(vs)
 22}
 23
 24// ToBoolMap returns a map of bool values, that are
 25// dereferenced if the passed in pointer was not nil. The bool
 26// zero value is used if the pointer was nil.
 27func ToBoolMap(vs map[string]*bool) map[string]bool {
 28	return ptr.ToBoolMap(vs)
 29}
 30
 31// ToByte returns byte value dereferenced if the passed
 32// in pointer was not nil. Returns a byte zero value if the
 33// pointer was nil.
 34func ToByte(p *byte) (v byte) {
 35	return ptr.ToByte(p)
 36}
 37
 38// ToByteSlice returns a slice of byte values, that are
 39// dereferenced if the passed in pointer was not nil. Returns a byte
 40// zero value if the pointer was nil.
 41func ToByteSlice(vs []*byte) []byte {
 42	return ptr.ToByteSlice(vs)
 43}
 44
 45// ToByteMap returns a map of byte values, that are
 46// dereferenced if the passed in pointer was not nil. The byte
 47// zero value is used if the pointer was nil.
 48func ToByteMap(vs map[string]*byte) map[string]byte {
 49	return ptr.ToByteMap(vs)
 50}
 51
 52// ToString returns string value dereferenced if the passed
 53// in pointer was not nil. Returns a string zero value if the
 54// pointer was nil.
 55func ToString(p *string) (v string) {
 56	return ptr.ToString(p)
 57}
 58
 59// ToStringSlice returns a slice of string values, that are
 60// dereferenced if the passed in pointer was not nil. Returns a string
 61// zero value if the pointer was nil.
 62func ToStringSlice(vs []*string) []string {
 63	return ptr.ToStringSlice(vs)
 64}
 65
 66// ToStringMap returns a map of string values, that are
 67// dereferenced if the passed in pointer was not nil. The string
 68// zero value is used if the pointer was nil.
 69func ToStringMap(vs map[string]*string) map[string]string {
 70	return ptr.ToStringMap(vs)
 71}
 72
 73// ToInt returns int value dereferenced if the passed
 74// in pointer was not nil. Returns a int zero value if the
 75// pointer was nil.
 76func ToInt(p *int) (v int) {
 77	return ptr.ToInt(p)
 78}
 79
 80// ToIntSlice returns a slice of int values, that are
 81// dereferenced if the passed in pointer was not nil. Returns a int
 82// zero value if the pointer was nil.
 83func ToIntSlice(vs []*int) []int {
 84	return ptr.ToIntSlice(vs)
 85}
 86
 87// ToIntMap returns a map of int values, that are
 88// dereferenced if the passed in pointer was not nil. The int
 89// zero value is used if the pointer was nil.
 90func ToIntMap(vs map[string]*int) map[string]int {
 91	return ptr.ToIntMap(vs)
 92}
 93
 94// ToInt8 returns int8 value dereferenced if the passed
 95// in pointer was not nil. Returns a int8 zero value if the
 96// pointer was nil.
 97func ToInt8(p *int8) (v int8) {
 98	return ptr.ToInt8(p)
 99}
100
101// ToInt8Slice returns a slice of int8 values, that are
102// dereferenced if the passed in pointer was not nil. Returns a int8
103// zero value if the pointer was nil.
104func ToInt8Slice(vs []*int8) []int8 {
105	return ptr.ToInt8Slice(vs)
106}
107
108// ToInt8Map returns a map of int8 values, that are
109// dereferenced if the passed in pointer was not nil. The int8
110// zero value is used if the pointer was nil.
111func ToInt8Map(vs map[string]*int8) map[string]int8 {
112	return ptr.ToInt8Map(vs)
113}
114
115// ToInt16 returns int16 value dereferenced if the passed
116// in pointer was not nil. Returns a int16 zero value if the
117// pointer was nil.
118func ToInt16(p *int16) (v int16) {
119	return ptr.ToInt16(p)
120}
121
122// ToInt16Slice returns a slice of int16 values, that are
123// dereferenced if the passed in pointer was not nil. Returns a int16
124// zero value if the pointer was nil.
125func ToInt16Slice(vs []*int16) []int16 {
126	return ptr.ToInt16Slice(vs)
127}
128
129// ToInt16Map returns a map of int16 values, that are
130// dereferenced if the passed in pointer was not nil. The int16
131// zero value is used if the pointer was nil.
132func ToInt16Map(vs map[string]*int16) map[string]int16 {
133	return ptr.ToInt16Map(vs)
134}
135
136// ToInt32 returns int32 value dereferenced if the passed
137// in pointer was not nil. Returns a int32 zero value if the
138// pointer was nil.
139func ToInt32(p *int32) (v int32) {
140	return ptr.ToInt32(p)
141}
142
143// ToInt32Slice returns a slice of int32 values, that are
144// dereferenced if the passed in pointer was not nil. Returns a int32
145// zero value if the pointer was nil.
146func ToInt32Slice(vs []*int32) []int32 {
147	return ptr.ToInt32Slice(vs)
148}
149
150// ToInt32Map returns a map of int32 values, that are
151// dereferenced if the passed in pointer was not nil. The int32
152// zero value is used if the pointer was nil.
153func ToInt32Map(vs map[string]*int32) map[string]int32 {
154	return ptr.ToInt32Map(vs)
155}
156
157// ToInt64 returns int64 value dereferenced if the passed
158// in pointer was not nil. Returns a int64 zero value if the
159// pointer was nil.
160func ToInt64(p *int64) (v int64) {
161	return ptr.ToInt64(p)
162}
163
164// ToInt64Slice returns a slice of int64 values, that are
165// dereferenced if the passed in pointer was not nil. Returns a int64
166// zero value if the pointer was nil.
167func ToInt64Slice(vs []*int64) []int64 {
168	return ptr.ToInt64Slice(vs)
169}
170
171// ToInt64Map returns a map of int64 values, that are
172// dereferenced if the passed in pointer was not nil. The int64
173// zero value is used if the pointer was nil.
174func ToInt64Map(vs map[string]*int64) map[string]int64 {
175	return ptr.ToInt64Map(vs)
176}
177
178// ToUint returns uint value dereferenced if the passed
179// in pointer was not nil. Returns a uint zero value if the
180// pointer was nil.
181func ToUint(p *uint) (v uint) {
182	return ptr.ToUint(p)
183}
184
185// ToUintSlice returns a slice of uint values, that are
186// dereferenced if the passed in pointer was not nil. Returns a uint
187// zero value if the pointer was nil.
188func ToUintSlice(vs []*uint) []uint {
189	return ptr.ToUintSlice(vs)
190}
191
192// ToUintMap returns a map of uint values, that are
193// dereferenced if the passed in pointer was not nil. The uint
194// zero value is used if the pointer was nil.
195func ToUintMap(vs map[string]*uint) map[string]uint {
196	return ptr.ToUintMap(vs)
197}
198
199// ToUint8 returns uint8 value dereferenced if the passed
200// in pointer was not nil. Returns a uint8 zero value if the
201// pointer was nil.
202func ToUint8(p *uint8) (v uint8) {
203	return ptr.ToUint8(p)
204}
205
206// ToUint8Slice returns a slice of uint8 values, that are
207// dereferenced if the passed in pointer was not nil. Returns a uint8
208// zero value if the pointer was nil.
209func ToUint8Slice(vs []*uint8) []uint8 {
210	return ptr.ToUint8Slice(vs)
211}
212
213// ToUint8Map returns a map of uint8 values, that are
214// dereferenced if the passed in pointer was not nil. The uint8
215// zero value is used if the pointer was nil.
216func ToUint8Map(vs map[string]*uint8) map[string]uint8 {
217	return ptr.ToUint8Map(vs)
218}
219
220// ToUint16 returns uint16 value dereferenced if the passed
221// in pointer was not nil. Returns a uint16 zero value if the
222// pointer was nil.
223func ToUint16(p *uint16) (v uint16) {
224	return ptr.ToUint16(p)
225}
226
227// ToUint16Slice returns a slice of uint16 values, that are
228// dereferenced if the passed in pointer was not nil. Returns a uint16
229// zero value if the pointer was nil.
230func ToUint16Slice(vs []*uint16) []uint16 {
231	return ptr.ToUint16Slice(vs)
232}
233
234// ToUint16Map returns a map of uint16 values, that are
235// dereferenced if the passed in pointer was not nil. The uint16
236// zero value is used if the pointer was nil.
237func ToUint16Map(vs map[string]*uint16) map[string]uint16 {
238	return ptr.ToUint16Map(vs)
239}
240
241// ToUint32 returns uint32 value dereferenced if the passed
242// in pointer was not nil. Returns a uint32 zero value if the
243// pointer was nil.
244func ToUint32(p *uint32) (v uint32) {
245	return ptr.ToUint32(p)
246}
247
248// ToUint32Slice returns a slice of uint32 values, that are
249// dereferenced if the passed in pointer was not nil. Returns a uint32
250// zero value if the pointer was nil.
251func ToUint32Slice(vs []*uint32) []uint32 {
252	return ptr.ToUint32Slice(vs)
253}
254
255// ToUint32Map returns a map of uint32 values, that are
256// dereferenced if the passed in pointer was not nil. The uint32
257// zero value is used if the pointer was nil.
258func ToUint32Map(vs map[string]*uint32) map[string]uint32 {
259	return ptr.ToUint32Map(vs)
260}
261
262// ToUint64 returns uint64 value dereferenced if the passed
263// in pointer was not nil. Returns a uint64 zero value if the
264// pointer was nil.
265func ToUint64(p *uint64) (v uint64) {
266	return ptr.ToUint64(p)
267}
268
269// ToUint64Slice returns a slice of uint64 values, that are
270// dereferenced if the passed in pointer was not nil. Returns a uint64
271// zero value if the pointer was nil.
272func ToUint64Slice(vs []*uint64) []uint64 {
273	return ptr.ToUint64Slice(vs)
274}
275
276// ToUint64Map returns a map of uint64 values, that are
277// dereferenced if the passed in pointer was not nil. The uint64
278// zero value is used if the pointer was nil.
279func ToUint64Map(vs map[string]*uint64) map[string]uint64 {
280	return ptr.ToUint64Map(vs)
281}
282
283// ToFloat32 returns float32 value dereferenced if the passed
284// in pointer was not nil. Returns a float32 zero value if the
285// pointer was nil.
286func ToFloat32(p *float32) (v float32) {
287	return ptr.ToFloat32(p)
288}
289
290// ToFloat32Slice returns a slice of float32 values, that are
291// dereferenced if the passed in pointer was not nil. Returns a float32
292// zero value if the pointer was nil.
293func ToFloat32Slice(vs []*float32) []float32 {
294	return ptr.ToFloat32Slice(vs)
295}
296
297// ToFloat32Map returns a map of float32 values, that are
298// dereferenced if the passed in pointer was not nil. The float32
299// zero value is used if the pointer was nil.
300func ToFloat32Map(vs map[string]*float32) map[string]float32 {
301	return ptr.ToFloat32Map(vs)
302}
303
304// ToFloat64 returns float64 value dereferenced if the passed
305// in pointer was not nil. Returns a float64 zero value if the
306// pointer was nil.
307func ToFloat64(p *float64) (v float64) {
308	return ptr.ToFloat64(p)
309}
310
311// ToFloat64Slice returns a slice of float64 values, that are
312// dereferenced if the passed in pointer was not nil. Returns a float64
313// zero value if the pointer was nil.
314func ToFloat64Slice(vs []*float64) []float64 {
315	return ptr.ToFloat64Slice(vs)
316}
317
318// ToFloat64Map returns a map of float64 values, that are
319// dereferenced if the passed in pointer was not nil. The float64
320// zero value is used if the pointer was nil.
321func ToFloat64Map(vs map[string]*float64) map[string]float64 {
322	return ptr.ToFloat64Map(vs)
323}
324
325// ToTime returns time.Time value dereferenced if the passed
326// in pointer was not nil. Returns a time.Time zero value if the
327// pointer was nil.
328func ToTime(p *time.Time) (v time.Time) {
329	return ptr.ToTime(p)
330}
331
332// ToTimeSlice returns a slice of time.Time values, that are
333// dereferenced if the passed in pointer was not nil. Returns a time.Time
334// zero value if the pointer was nil.
335func ToTimeSlice(vs []*time.Time) []time.Time {
336	return ptr.ToTimeSlice(vs)
337}
338
339// ToTimeMap returns a map of time.Time values, that are
340// dereferenced if the passed in pointer was not nil. The time.Time
341// zero value is used if the pointer was nil.
342func ToTimeMap(vs map[string]*time.Time) map[string]time.Time {
343	return ptr.ToTimeMap(vs)
344}
345
346// ToDuration returns time.Duration value dereferenced if the passed
347// in pointer was not nil. Returns a time.Duration zero value if the
348// pointer was nil.
349func ToDuration(p *time.Duration) (v time.Duration) {
350	return ptr.ToDuration(p)
351}
352
353// ToDurationSlice returns a slice of time.Duration values, that are
354// dereferenced if the passed in pointer was not nil. Returns a time.Duration
355// zero value if the pointer was nil.
356func ToDurationSlice(vs []*time.Duration) []time.Duration {
357	return ptr.ToDurationSlice(vs)
358}
359
360// ToDurationMap returns a map of time.Duration values, that are
361// dereferenced if the passed in pointer was not nil. The time.Duration
362// zero value is used if the pointer was nil.
363func ToDurationMap(vs map[string]*time.Duration) map[string]time.Duration {
364	return ptr.ToDurationMap(vs)
365}