id
int32 0
167k
| repo
stringlengths 5
54
| path
stringlengths 4
155
| func_name
stringlengths 1
118
| original_string
stringlengths 52
85.5k
| language
stringclasses 1
value | code
stringlengths 52
85.5k
| code_tokens
sequencelengths 21
1.41k
| docstring
stringlengths 6
2.61k
| docstring_tokens
sequencelengths 3
215
| sha
stringlengths 40
40
| url
stringlengths 85
252
|
---|---|---|---|---|---|---|---|---|---|---|---|
500 | aws/aws-sdk-go | service/support/api.go | SetHasFlaggedResources | func (s *TrustedAdvisorCheckSummary) SetHasFlaggedResources(v bool) *TrustedAdvisorCheckSummary {
s.HasFlaggedResources = &v
return s
} | go | func (s *TrustedAdvisorCheckSummary) SetHasFlaggedResources(v bool) *TrustedAdvisorCheckSummary {
s.HasFlaggedResources = &v
return s
} | [
"func",
"(",
"s",
"*",
"TrustedAdvisorCheckSummary",
")",
"SetHasFlaggedResources",
"(",
"v",
"bool",
")",
"*",
"TrustedAdvisorCheckSummary",
"{",
"s",
".",
"HasFlaggedResources",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetHasFlaggedResources sets the HasFlaggedResources field's value. | [
"SetHasFlaggedResources",
"sets",
"the",
"HasFlaggedResources",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/support/api.go#L3333-L3336 |
501 | aws/aws-sdk-go | service/support/api.go | SetEstimatedMonthlySavings | func (s *TrustedAdvisorCostOptimizingSummary) SetEstimatedMonthlySavings(v float64) *TrustedAdvisorCostOptimizingSummary {
s.EstimatedMonthlySavings = &v
return s
} | go | func (s *TrustedAdvisorCostOptimizingSummary) SetEstimatedMonthlySavings(v float64) *TrustedAdvisorCostOptimizingSummary {
s.EstimatedMonthlySavings = &v
return s
} | [
"func",
"(",
"s",
"*",
"TrustedAdvisorCostOptimizingSummary",
")",
"SetEstimatedMonthlySavings",
"(",
"v",
"float64",
")",
"*",
"TrustedAdvisorCostOptimizingSummary",
"{",
"s",
".",
"EstimatedMonthlySavings",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetEstimatedMonthlySavings sets the EstimatedMonthlySavings field's value. | [
"SetEstimatedMonthlySavings",
"sets",
"the",
"EstimatedMonthlySavings",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/support/api.go#L3385-L3388 |
502 | aws/aws-sdk-go | service/support/api.go | SetEstimatedPercentMonthlySavings | func (s *TrustedAdvisorCostOptimizingSummary) SetEstimatedPercentMonthlySavings(v float64) *TrustedAdvisorCostOptimizingSummary {
s.EstimatedPercentMonthlySavings = &v
return s
} | go | func (s *TrustedAdvisorCostOptimizingSummary) SetEstimatedPercentMonthlySavings(v float64) *TrustedAdvisorCostOptimizingSummary {
s.EstimatedPercentMonthlySavings = &v
return s
} | [
"func",
"(",
"s",
"*",
"TrustedAdvisorCostOptimizingSummary",
")",
"SetEstimatedPercentMonthlySavings",
"(",
"v",
"float64",
")",
"*",
"TrustedAdvisorCostOptimizingSummary",
"{",
"s",
".",
"EstimatedPercentMonthlySavings",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetEstimatedPercentMonthlySavings sets the EstimatedPercentMonthlySavings field's value. | [
"SetEstimatedPercentMonthlySavings",
"sets",
"the",
"EstimatedPercentMonthlySavings",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/support/api.go#L3391-L3394 |
503 | aws/aws-sdk-go | service/support/api.go | SetIsSuppressed | func (s *TrustedAdvisorResourceDetail) SetIsSuppressed(v bool) *TrustedAdvisorResourceDetail {
s.IsSuppressed = &v
return s
} | go | func (s *TrustedAdvisorResourceDetail) SetIsSuppressed(v bool) *TrustedAdvisorResourceDetail {
s.IsSuppressed = &v
return s
} | [
"func",
"(",
"s",
"*",
"TrustedAdvisorResourceDetail",
")",
"SetIsSuppressed",
"(",
"v",
"bool",
")",
"*",
"TrustedAdvisorResourceDetail",
"{",
"s",
".",
"IsSuppressed",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetIsSuppressed sets the IsSuppressed field's value. | [
"SetIsSuppressed",
"sets",
"the",
"IsSuppressed",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/support/api.go#L3438-L3441 |
504 | aws/aws-sdk-go | service/support/api.go | SetResourcesFlagged | func (s *TrustedAdvisorResourcesSummary) SetResourcesFlagged(v int64) *TrustedAdvisorResourcesSummary {
s.ResourcesFlagged = &v
return s
} | go | func (s *TrustedAdvisorResourcesSummary) SetResourcesFlagged(v int64) *TrustedAdvisorResourcesSummary {
s.ResourcesFlagged = &v
return s
} | [
"func",
"(",
"s",
"*",
"TrustedAdvisorResourcesSummary",
")",
"SetResourcesFlagged",
"(",
"v",
"int64",
")",
"*",
"TrustedAdvisorResourcesSummary",
"{",
"s",
".",
"ResourcesFlagged",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetResourcesFlagged sets the ResourcesFlagged field's value. | [
"SetResourcesFlagged",
"sets",
"the",
"ResourcesFlagged",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/support/api.go#L3507-L3510 |
505 | aws/aws-sdk-go | service/support/api.go | SetResourcesIgnored | func (s *TrustedAdvisorResourcesSummary) SetResourcesIgnored(v int64) *TrustedAdvisorResourcesSummary {
s.ResourcesIgnored = &v
return s
} | go | func (s *TrustedAdvisorResourcesSummary) SetResourcesIgnored(v int64) *TrustedAdvisorResourcesSummary {
s.ResourcesIgnored = &v
return s
} | [
"func",
"(",
"s",
"*",
"TrustedAdvisorResourcesSummary",
")",
"SetResourcesIgnored",
"(",
"v",
"int64",
")",
"*",
"TrustedAdvisorResourcesSummary",
"{",
"s",
".",
"ResourcesIgnored",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetResourcesIgnored sets the ResourcesIgnored field's value. | [
"SetResourcesIgnored",
"sets",
"the",
"ResourcesIgnored",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/support/api.go#L3513-L3516 |
506 | aws/aws-sdk-go | service/support/api.go | SetResourcesProcessed | func (s *TrustedAdvisorResourcesSummary) SetResourcesProcessed(v int64) *TrustedAdvisorResourcesSummary {
s.ResourcesProcessed = &v
return s
} | go | func (s *TrustedAdvisorResourcesSummary) SetResourcesProcessed(v int64) *TrustedAdvisorResourcesSummary {
s.ResourcesProcessed = &v
return s
} | [
"func",
"(",
"s",
"*",
"TrustedAdvisorResourcesSummary",
")",
"SetResourcesProcessed",
"(",
"v",
"int64",
")",
"*",
"TrustedAdvisorResourcesSummary",
"{",
"s",
".",
"ResourcesProcessed",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetResourcesProcessed sets the ResourcesProcessed field's value. | [
"SetResourcesProcessed",
"sets",
"the",
"ResourcesProcessed",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/support/api.go#L3519-L3522 |
507 | aws/aws-sdk-go | service/support/api.go | SetResourcesSuppressed | func (s *TrustedAdvisorResourcesSummary) SetResourcesSuppressed(v int64) *TrustedAdvisorResourcesSummary {
s.ResourcesSuppressed = &v
return s
} | go | func (s *TrustedAdvisorResourcesSummary) SetResourcesSuppressed(v int64) *TrustedAdvisorResourcesSummary {
s.ResourcesSuppressed = &v
return s
} | [
"func",
"(",
"s",
"*",
"TrustedAdvisorResourcesSummary",
")",
"SetResourcesSuppressed",
"(",
"v",
"int64",
")",
"*",
"TrustedAdvisorResourcesSummary",
"{",
"s",
".",
"ResourcesSuppressed",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetResourcesSuppressed sets the ResourcesSuppressed field's value. | [
"SetResourcesSuppressed",
"sets",
"the",
"ResourcesSuppressed",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/support/api.go#L3525-L3528 |
508 | aws/aws-sdk-go | private/util/util.go | GoFmt | func GoFmt(buf string) string {
formatted, err := format.Source([]byte(buf))
if err != nil {
panic(fmt.Errorf("%s\nOriginal code:\n%s", err.Error(), buf))
}
return string(formatted)
} | go | func GoFmt(buf string) string {
formatted, err := format.Source([]byte(buf))
if err != nil {
panic(fmt.Errorf("%s\nOriginal code:\n%s", err.Error(), buf))
}
return string(formatted)
} | [
"func",
"GoFmt",
"(",
"buf",
"string",
")",
"string",
"{",
"formatted",
",",
"err",
":=",
"format",
".",
"Source",
"(",
"[",
"]",
"byte",
"(",
"buf",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"panic",
"(",
"fmt",
".",
"Errorf",
"(",
"\"",
"\\n",
"\\n",
"\"",
",",
"err",
".",
"Error",
"(",
")",
",",
"buf",
")",
")",
"\n",
"}",
"\n",
"return",
"string",
"(",
"formatted",
")",
"\n",
"}"
] | // GoFmt returns the Go formated string of the input.
//
// Panics if the format fails. | [
"GoFmt",
"returns",
"the",
"Go",
"formated",
"string",
"of",
"the",
"input",
".",
"Panics",
"if",
"the",
"format",
"fails",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/util/util.go#L19-L25 |
509 | aws/aws-sdk-go | private/util/util.go | Capitalize | func Capitalize(s string) string {
if len(s) == 1 {
return strings.ToUpper(s)
}
return strings.ToUpper(s[0:1]) + s[1:]
} | go | func Capitalize(s string) string {
if len(s) == 1 {
return strings.ToUpper(s)
}
return strings.ToUpper(s[0:1]) + s[1:]
} | [
"func",
"Capitalize",
"(",
"s",
"string",
")",
"string",
"{",
"if",
"len",
"(",
"s",
")",
"==",
"1",
"{",
"return",
"strings",
".",
"ToUpper",
"(",
"s",
")",
"\n",
"}",
"\n",
"return",
"strings",
".",
"ToUpper",
"(",
"s",
"[",
"0",
":",
"1",
"]",
")",
"+",
"s",
"[",
"1",
":",
"]",
"\n",
"}"
] | // Capitalize capitalizes the first character of the string. | [
"Capitalize",
"capitalizes",
"the",
"first",
"character",
"of",
"the",
"string",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/util/util.go#L37-L42 |
510 | aws/aws-sdk-go | private/util/util.go | SortXML | func SortXML(r io.Reader) string {
var buf bytes.Buffer
d := xml.NewDecoder(r)
root, _ := xmlutil.XMLToStruct(d, nil)
e := xml.NewEncoder(&buf)
xmlutil.StructToXML(e, root, true)
return buf.String()
} | go | func SortXML(r io.Reader) string {
var buf bytes.Buffer
d := xml.NewDecoder(r)
root, _ := xmlutil.XMLToStruct(d, nil)
e := xml.NewEncoder(&buf)
xmlutil.StructToXML(e, root, true)
return buf.String()
} | [
"func",
"SortXML",
"(",
"r",
"io",
".",
"Reader",
")",
"string",
"{",
"var",
"buf",
"bytes",
".",
"Buffer",
"\n",
"d",
":=",
"xml",
".",
"NewDecoder",
"(",
"r",
")",
"\n",
"root",
",",
"_",
":=",
"xmlutil",
".",
"XMLToStruct",
"(",
"d",
",",
"nil",
")",
"\n",
"e",
":=",
"xml",
".",
"NewEncoder",
"(",
"&",
"buf",
")",
"\n",
"xmlutil",
".",
"StructToXML",
"(",
"e",
",",
"root",
",",
"true",
")",
"\n",
"return",
"buf",
".",
"String",
"(",
")",
"\n",
"}"
] | // SortXML sorts the reader's XML elements | [
"SortXML",
"sorts",
"the",
"reader",
"s",
"XML",
"elements"
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/util/util.go#L45-L52 |
511 | aws/aws-sdk-go | private/util/util.go | PrettyPrint | func PrettyPrint(v interface{}) string {
value := reflect.ValueOf(v)
switch value.Kind() {
case reflect.Struct:
str := fullName(value.Type()) + "{\n"
for i := 0; i < value.NumField(); i++ {
l := string(value.Type().Field(i).Name[0])
if strings.ToUpper(l) == l {
str += value.Type().Field(i).Name + ": "
str += PrettyPrint(value.Field(i).Interface())
str += ",\n"
}
}
str += "}"
return str
case reflect.Map:
str := "map[" + fullName(value.Type().Key()) + "]" + fullName(value.Type().Elem()) + "{\n"
for _, k := range value.MapKeys() {
str += "\"" + k.String() + "\": "
str += PrettyPrint(value.MapIndex(k).Interface())
str += ",\n"
}
str += "}"
return str
case reflect.Ptr:
if e := value.Elem(); e.IsValid() {
return "&" + PrettyPrint(e.Interface())
}
return "nil"
case reflect.Slice:
str := "[]" + fullName(value.Type().Elem()) + "{\n"
for i := 0; i < value.Len(); i++ {
str += PrettyPrint(value.Index(i).Interface())
str += ",\n"
}
str += "}"
return str
default:
return fmt.Sprintf("%#v", v)
}
} | go | func PrettyPrint(v interface{}) string {
value := reflect.ValueOf(v)
switch value.Kind() {
case reflect.Struct:
str := fullName(value.Type()) + "{\n"
for i := 0; i < value.NumField(); i++ {
l := string(value.Type().Field(i).Name[0])
if strings.ToUpper(l) == l {
str += value.Type().Field(i).Name + ": "
str += PrettyPrint(value.Field(i).Interface())
str += ",\n"
}
}
str += "}"
return str
case reflect.Map:
str := "map[" + fullName(value.Type().Key()) + "]" + fullName(value.Type().Elem()) + "{\n"
for _, k := range value.MapKeys() {
str += "\"" + k.String() + "\": "
str += PrettyPrint(value.MapIndex(k).Interface())
str += ",\n"
}
str += "}"
return str
case reflect.Ptr:
if e := value.Elem(); e.IsValid() {
return "&" + PrettyPrint(e.Interface())
}
return "nil"
case reflect.Slice:
str := "[]" + fullName(value.Type().Elem()) + "{\n"
for i := 0; i < value.Len(); i++ {
str += PrettyPrint(value.Index(i).Interface())
str += ",\n"
}
str += "}"
return str
default:
return fmt.Sprintf("%#v", v)
}
} | [
"func",
"PrettyPrint",
"(",
"v",
"interface",
"{",
"}",
")",
"string",
"{",
"value",
":=",
"reflect",
".",
"ValueOf",
"(",
"v",
")",
"\n",
"switch",
"value",
".",
"Kind",
"(",
")",
"{",
"case",
"reflect",
".",
"Struct",
":",
"str",
":=",
"fullName",
"(",
"value",
".",
"Type",
"(",
")",
")",
"+",
"\"",
"\\n",
"\"",
"\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"value",
".",
"NumField",
"(",
")",
";",
"i",
"++",
"{",
"l",
":=",
"string",
"(",
"value",
".",
"Type",
"(",
")",
".",
"Field",
"(",
"i",
")",
".",
"Name",
"[",
"0",
"]",
")",
"\n",
"if",
"strings",
".",
"ToUpper",
"(",
"l",
")",
"==",
"l",
"{",
"str",
"+=",
"value",
".",
"Type",
"(",
")",
".",
"Field",
"(",
"i",
")",
".",
"Name",
"+",
"\"",
"\"",
"\n",
"str",
"+=",
"PrettyPrint",
"(",
"value",
".",
"Field",
"(",
"i",
")",
".",
"Interface",
"(",
")",
")",
"\n",
"str",
"+=",
"\"",
"\\n",
"\"",
"\n",
"}",
"\n",
"}",
"\n",
"str",
"+=",
"\"",
"\"",
"\n",
"return",
"str",
"\n",
"case",
"reflect",
".",
"Map",
":",
"str",
":=",
"\"",
"\"",
"+",
"fullName",
"(",
"value",
".",
"Type",
"(",
")",
".",
"Key",
"(",
")",
")",
"+",
"\"",
"\"",
"+",
"fullName",
"(",
"value",
".",
"Type",
"(",
")",
".",
"Elem",
"(",
")",
")",
"+",
"\"",
"\\n",
"\"",
"\n",
"for",
"_",
",",
"k",
":=",
"range",
"value",
".",
"MapKeys",
"(",
")",
"{",
"str",
"+=",
"\"",
"\\\"",
"\"",
"+",
"k",
".",
"String",
"(",
")",
"+",
"\"",
"\\\"",
"\"",
"\n",
"str",
"+=",
"PrettyPrint",
"(",
"value",
".",
"MapIndex",
"(",
"k",
")",
".",
"Interface",
"(",
")",
")",
"\n",
"str",
"+=",
"\"",
"\\n",
"\"",
"\n",
"}",
"\n",
"str",
"+=",
"\"",
"\"",
"\n",
"return",
"str",
"\n",
"case",
"reflect",
".",
"Ptr",
":",
"if",
"e",
":=",
"value",
".",
"Elem",
"(",
")",
";",
"e",
".",
"IsValid",
"(",
")",
"{",
"return",
"\"",
"\"",
"+",
"PrettyPrint",
"(",
"e",
".",
"Interface",
"(",
")",
")",
"\n",
"}",
"\n",
"return",
"\"",
"\"",
"\n",
"case",
"reflect",
".",
"Slice",
":",
"str",
":=",
"\"",
"\"",
"+",
"fullName",
"(",
"value",
".",
"Type",
"(",
")",
".",
"Elem",
"(",
")",
")",
"+",
"\"",
"\\n",
"\"",
"\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"value",
".",
"Len",
"(",
")",
";",
"i",
"++",
"{",
"str",
"+=",
"PrettyPrint",
"(",
"value",
".",
"Index",
"(",
"i",
")",
".",
"Interface",
"(",
")",
")",
"\n",
"str",
"+=",
"\"",
"\\n",
"\"",
"\n",
"}",
"\n",
"str",
"+=",
"\"",
"\"",
"\n",
"return",
"str",
"\n",
"default",
":",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"v",
")",
"\n",
"}",
"\n",
"}"
] | // PrettyPrint generates a human readable representation of the value v.
// All values of v are recursively found and pretty printed also. | [
"PrettyPrint",
"generates",
"a",
"human",
"readable",
"representation",
"of",
"the",
"value",
"v",
".",
"All",
"values",
"of",
"v",
"are",
"recursively",
"found",
"and",
"pretty",
"printed",
"also",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/util/util.go#L56-L96 |
512 | aws/aws-sdk-go | service/secretsmanager/api.go | SetForceDeleteWithoutRecovery | func (s *DeleteSecretInput) SetForceDeleteWithoutRecovery(v bool) *DeleteSecretInput {
s.ForceDeleteWithoutRecovery = &v
return s
} | go | func (s *DeleteSecretInput) SetForceDeleteWithoutRecovery(v bool) *DeleteSecretInput {
s.ForceDeleteWithoutRecovery = &v
return s
} | [
"func",
"(",
"s",
"*",
"DeleteSecretInput",
")",
"SetForceDeleteWithoutRecovery",
"(",
"v",
"bool",
")",
"*",
"DeleteSecretInput",
"{",
"s",
".",
"ForceDeleteWithoutRecovery",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetForceDeleteWithoutRecovery sets the ForceDeleteWithoutRecovery field's value. | [
"SetForceDeleteWithoutRecovery",
"sets",
"the",
"ForceDeleteWithoutRecovery",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/secretsmanager/api.go#L3031-L3034 |
513 | aws/aws-sdk-go | service/secretsmanager/api.go | SetRecoveryWindowInDays | func (s *DeleteSecretInput) SetRecoveryWindowInDays(v int64) *DeleteSecretInput {
s.RecoveryWindowInDays = &v
return s
} | go | func (s *DeleteSecretInput) SetRecoveryWindowInDays(v int64) *DeleteSecretInput {
s.RecoveryWindowInDays = &v
return s
} | [
"func",
"(",
"s",
"*",
"DeleteSecretInput",
")",
"SetRecoveryWindowInDays",
"(",
"v",
"int64",
")",
"*",
"DeleteSecretInput",
"{",
"s",
".",
"RecoveryWindowInDays",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetRecoveryWindowInDays sets the RecoveryWindowInDays field's value. | [
"SetRecoveryWindowInDays",
"sets",
"the",
"RecoveryWindowInDays",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/secretsmanager/api.go#L3037-L3040 |
514 | aws/aws-sdk-go | service/secretsmanager/api.go | SetVersionIdsToStages | func (s *DescribeSecretOutput) SetVersionIdsToStages(v map[string][]*string) *DescribeSecretOutput {
s.VersionIdsToStages = v
return s
} | go | func (s *DescribeSecretOutput) SetVersionIdsToStages(v map[string][]*string) *DescribeSecretOutput {
s.VersionIdsToStages = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeSecretOutput",
")",
"SetVersionIdsToStages",
"(",
"v",
"map",
"[",
"string",
"]",
"[",
"]",
"*",
"string",
")",
"*",
"DescribeSecretOutput",
"{",
"s",
".",
"VersionIdsToStages",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetVersionIdsToStages sets the VersionIdsToStages field's value. | [
"SetVersionIdsToStages",
"sets",
"the",
"VersionIdsToStages",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/secretsmanager/api.go#L3295-L3298 |
515 | aws/aws-sdk-go | service/secretsmanager/api.go | SetExcludeCharacters | func (s *GetRandomPasswordInput) SetExcludeCharacters(v string) *GetRandomPasswordInput {
s.ExcludeCharacters = &v
return s
} | go | func (s *GetRandomPasswordInput) SetExcludeCharacters(v string) *GetRandomPasswordInput {
s.ExcludeCharacters = &v
return s
} | [
"func",
"(",
"s",
"*",
"GetRandomPasswordInput",
")",
"SetExcludeCharacters",
"(",
"v",
"string",
")",
"*",
"GetRandomPasswordInput",
"{",
"s",
".",
"ExcludeCharacters",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetExcludeCharacters sets the ExcludeCharacters field's value. | [
"SetExcludeCharacters",
"sets",
"the",
"ExcludeCharacters",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/secretsmanager/api.go#L3372-L3375 |
516 | aws/aws-sdk-go | service/secretsmanager/api.go | SetExcludeLowercase | func (s *GetRandomPasswordInput) SetExcludeLowercase(v bool) *GetRandomPasswordInput {
s.ExcludeLowercase = &v
return s
} | go | func (s *GetRandomPasswordInput) SetExcludeLowercase(v bool) *GetRandomPasswordInput {
s.ExcludeLowercase = &v
return s
} | [
"func",
"(",
"s",
"*",
"GetRandomPasswordInput",
")",
"SetExcludeLowercase",
"(",
"v",
"bool",
")",
"*",
"GetRandomPasswordInput",
"{",
"s",
".",
"ExcludeLowercase",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetExcludeLowercase sets the ExcludeLowercase field's value. | [
"SetExcludeLowercase",
"sets",
"the",
"ExcludeLowercase",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/secretsmanager/api.go#L3378-L3381 |
517 | aws/aws-sdk-go | service/secretsmanager/api.go | SetExcludeNumbers | func (s *GetRandomPasswordInput) SetExcludeNumbers(v bool) *GetRandomPasswordInput {
s.ExcludeNumbers = &v
return s
} | go | func (s *GetRandomPasswordInput) SetExcludeNumbers(v bool) *GetRandomPasswordInput {
s.ExcludeNumbers = &v
return s
} | [
"func",
"(",
"s",
"*",
"GetRandomPasswordInput",
")",
"SetExcludeNumbers",
"(",
"v",
"bool",
")",
"*",
"GetRandomPasswordInput",
"{",
"s",
".",
"ExcludeNumbers",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetExcludeNumbers sets the ExcludeNumbers field's value. | [
"SetExcludeNumbers",
"sets",
"the",
"ExcludeNumbers",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/secretsmanager/api.go#L3384-L3387 |
518 | aws/aws-sdk-go | service/secretsmanager/api.go | SetExcludePunctuation | func (s *GetRandomPasswordInput) SetExcludePunctuation(v bool) *GetRandomPasswordInput {
s.ExcludePunctuation = &v
return s
} | go | func (s *GetRandomPasswordInput) SetExcludePunctuation(v bool) *GetRandomPasswordInput {
s.ExcludePunctuation = &v
return s
} | [
"func",
"(",
"s",
"*",
"GetRandomPasswordInput",
")",
"SetExcludePunctuation",
"(",
"v",
"bool",
")",
"*",
"GetRandomPasswordInput",
"{",
"s",
".",
"ExcludePunctuation",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetExcludePunctuation sets the ExcludePunctuation field's value. | [
"SetExcludePunctuation",
"sets",
"the",
"ExcludePunctuation",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/secretsmanager/api.go#L3390-L3393 |
519 | aws/aws-sdk-go | service/secretsmanager/api.go | SetExcludeUppercase | func (s *GetRandomPasswordInput) SetExcludeUppercase(v bool) *GetRandomPasswordInput {
s.ExcludeUppercase = &v
return s
} | go | func (s *GetRandomPasswordInput) SetExcludeUppercase(v bool) *GetRandomPasswordInput {
s.ExcludeUppercase = &v
return s
} | [
"func",
"(",
"s",
"*",
"GetRandomPasswordInput",
")",
"SetExcludeUppercase",
"(",
"v",
"bool",
")",
"*",
"GetRandomPasswordInput",
"{",
"s",
".",
"ExcludeUppercase",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetExcludeUppercase sets the ExcludeUppercase field's value. | [
"SetExcludeUppercase",
"sets",
"the",
"ExcludeUppercase",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/secretsmanager/api.go#L3396-L3399 |
520 | aws/aws-sdk-go | service/secretsmanager/api.go | SetIncludeSpace | func (s *GetRandomPasswordInput) SetIncludeSpace(v bool) *GetRandomPasswordInput {
s.IncludeSpace = &v
return s
} | go | func (s *GetRandomPasswordInput) SetIncludeSpace(v bool) *GetRandomPasswordInput {
s.IncludeSpace = &v
return s
} | [
"func",
"(",
"s",
"*",
"GetRandomPasswordInput",
")",
"SetIncludeSpace",
"(",
"v",
"bool",
")",
"*",
"GetRandomPasswordInput",
"{",
"s",
".",
"IncludeSpace",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetIncludeSpace sets the IncludeSpace field's value. | [
"SetIncludeSpace",
"sets",
"the",
"IncludeSpace",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/secretsmanager/api.go#L3402-L3405 |
521 | aws/aws-sdk-go | service/secretsmanager/api.go | SetPasswordLength | func (s *GetRandomPasswordInput) SetPasswordLength(v int64) *GetRandomPasswordInput {
s.PasswordLength = &v
return s
} | go | func (s *GetRandomPasswordInput) SetPasswordLength(v int64) *GetRandomPasswordInput {
s.PasswordLength = &v
return s
} | [
"func",
"(",
"s",
"*",
"GetRandomPasswordInput",
")",
"SetPasswordLength",
"(",
"v",
"int64",
")",
"*",
"GetRandomPasswordInput",
"{",
"s",
".",
"PasswordLength",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetPasswordLength sets the PasswordLength field's value. | [
"SetPasswordLength",
"sets",
"the",
"PasswordLength",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/secretsmanager/api.go#L3408-L3411 |
522 | aws/aws-sdk-go | service/secretsmanager/api.go | SetRequireEachIncludedType | func (s *GetRandomPasswordInput) SetRequireEachIncludedType(v bool) *GetRandomPasswordInput {
s.RequireEachIncludedType = &v
return s
} | go | func (s *GetRandomPasswordInput) SetRequireEachIncludedType(v bool) *GetRandomPasswordInput {
s.RequireEachIncludedType = &v
return s
} | [
"func",
"(",
"s",
"*",
"GetRandomPasswordInput",
")",
"SetRequireEachIncludedType",
"(",
"v",
"bool",
")",
"*",
"GetRandomPasswordInput",
"{",
"s",
".",
"RequireEachIncludedType",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetRequireEachIncludedType sets the RequireEachIncludedType field's value. | [
"SetRequireEachIncludedType",
"sets",
"the",
"RequireEachIncludedType",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/secretsmanager/api.go#L3414-L3417 |
523 | aws/aws-sdk-go | service/secretsmanager/api.go | SetRandomPassword | func (s *GetRandomPasswordOutput) SetRandomPassword(v string) *GetRandomPasswordOutput {
s.RandomPassword = &v
return s
} | go | func (s *GetRandomPasswordOutput) SetRandomPassword(v string) *GetRandomPasswordOutput {
s.RandomPassword = &v
return s
} | [
"func",
"(",
"s",
"*",
"GetRandomPasswordOutput",
")",
"SetRandomPassword",
"(",
"v",
"string",
")",
"*",
"GetRandomPasswordOutput",
"{",
"s",
".",
"RandomPassword",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetRandomPassword sets the RandomPassword field's value. | [
"SetRandomPassword",
"sets",
"the",
"RandomPassword",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/secretsmanager/api.go#L3437-L3440 |
524 | aws/aws-sdk-go | service/secretsmanager/api.go | SetIncludeDeprecated | func (s *ListSecretVersionIdsInput) SetIncludeDeprecated(v bool) *ListSecretVersionIdsInput {
s.IncludeDeprecated = &v
return s
} | go | func (s *ListSecretVersionIdsInput) SetIncludeDeprecated(v bool) *ListSecretVersionIdsInput {
s.IncludeDeprecated = &v
return s
} | [
"func",
"(",
"s",
"*",
"ListSecretVersionIdsInput",
")",
"SetIncludeDeprecated",
"(",
"v",
"bool",
")",
"*",
"ListSecretVersionIdsInput",
"{",
"s",
".",
"IncludeDeprecated",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetIncludeDeprecated sets the IncludeDeprecated field's value. | [
"SetIncludeDeprecated",
"sets",
"the",
"IncludeDeprecated",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/secretsmanager/api.go#L3816-L3819 |
525 | aws/aws-sdk-go | service/secretsmanager/api.go | SetSecretList | func (s *ListSecretsOutput) SetSecretList(v []*SecretListEntry) *ListSecretsOutput {
s.SecretList = v
return s
} | go | func (s *ListSecretsOutput) SetSecretList(v []*SecretListEntry) *ListSecretsOutput {
s.SecretList = v
return s
} | [
"func",
"(",
"s",
"*",
"ListSecretsOutput",
")",
"SetSecretList",
"(",
"v",
"[",
"]",
"*",
"SecretListEntry",
")",
"*",
"ListSecretsOutput",
"{",
"s",
".",
"SecretList",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetSecretList sets the SecretList field's value. | [
"SetSecretList",
"sets",
"the",
"SecretList",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/secretsmanager/api.go#L3994-L3997 |
526 | aws/aws-sdk-go | service/secretsmanager/api.go | SetAutomaticallyAfterDays | func (s *RotationRulesType) SetAutomaticallyAfterDays(v int64) *RotationRulesType {
s.AutomaticallyAfterDays = &v
return s
} | go | func (s *RotationRulesType) SetAutomaticallyAfterDays(v int64) *RotationRulesType {
s.AutomaticallyAfterDays = &v
return s
} | [
"func",
"(",
"s",
"*",
"RotationRulesType",
")",
"SetAutomaticallyAfterDays",
"(",
"v",
"int64",
")",
"*",
"RotationRulesType",
"{",
"s",
".",
"AutomaticallyAfterDays",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetAutomaticallyAfterDays sets the AutomaticallyAfterDays field's value. | [
"SetAutomaticallyAfterDays",
"sets",
"the",
"AutomaticallyAfterDays",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/secretsmanager/api.go#L4601-L4604 |
527 | aws/aws-sdk-go | service/secretsmanager/api.go | SetSecretVersionsToStages | func (s *SecretListEntry) SetSecretVersionsToStages(v map[string][]*string) *SecretListEntry {
s.SecretVersionsToStages = v
return s
} | go | func (s *SecretListEntry) SetSecretVersionsToStages(v map[string][]*string) *SecretListEntry {
s.SecretVersionsToStages = v
return s
} | [
"func",
"(",
"s",
"*",
"SecretListEntry",
")",
"SetSecretVersionsToStages",
"(",
"v",
"map",
"[",
"string",
"]",
"[",
"]",
"*",
"string",
")",
"*",
"SecretListEntry",
"{",
"s",
".",
"SecretVersionsToStages",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetSecretVersionsToStages sets the SecretVersionsToStages field's value. | [
"SetSecretVersionsToStages",
"sets",
"the",
"SecretVersionsToStages",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/secretsmanager/api.go#L4752-L4755 |
528 | aws/aws-sdk-go | service/secretsmanager/api.go | SetMoveToVersionId | func (s *UpdateSecretVersionStageInput) SetMoveToVersionId(v string) *UpdateSecretVersionStageInput {
s.MoveToVersionId = &v
return s
} | go | func (s *UpdateSecretVersionStageInput) SetMoveToVersionId(v string) *UpdateSecretVersionStageInput {
s.MoveToVersionId = &v
return s
} | [
"func",
"(",
"s",
"*",
"UpdateSecretVersionStageInput",
")",
"SetMoveToVersionId",
"(",
"v",
"string",
")",
"*",
"UpdateSecretVersionStageInput",
"{",
"s",
".",
"MoveToVersionId",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetMoveToVersionId sets the MoveToVersionId field's value. | [
"SetMoveToVersionId",
"sets",
"the",
"MoveToVersionId",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/secretsmanager/api.go#L5356-L5359 |
529 | aws/aws-sdk-go | service/secretsmanager/api.go | SetRemoveFromVersionId | func (s *UpdateSecretVersionStageInput) SetRemoveFromVersionId(v string) *UpdateSecretVersionStageInput {
s.RemoveFromVersionId = &v
return s
} | go | func (s *UpdateSecretVersionStageInput) SetRemoveFromVersionId(v string) *UpdateSecretVersionStageInput {
s.RemoveFromVersionId = &v
return s
} | [
"func",
"(",
"s",
"*",
"UpdateSecretVersionStageInput",
")",
"SetRemoveFromVersionId",
"(",
"v",
"string",
")",
"*",
"UpdateSecretVersionStageInput",
"{",
"s",
".",
"RemoveFromVersionId",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetRemoveFromVersionId sets the RemoveFromVersionId field's value. | [
"SetRemoveFromVersionId",
"sets",
"the",
"RemoveFromVersionId",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/secretsmanager/api.go#L5362-L5365 |
530 | aws/aws-sdk-go | service/ecr/api.go | SetAuthorizationToken | func (s *AuthorizationData) SetAuthorizationToken(v string) *AuthorizationData {
s.AuthorizationToken = &v
return s
} | go | func (s *AuthorizationData) SetAuthorizationToken(v string) *AuthorizationData {
s.AuthorizationToken = &v
return s
} | [
"func",
"(",
"s",
"*",
"AuthorizationData",
")",
"SetAuthorizationToken",
"(",
"v",
"string",
")",
"*",
"AuthorizationData",
"{",
"s",
".",
"AuthorizationToken",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetAuthorizationToken sets the AuthorizationToken field's value. | [
"SetAuthorizationToken",
"sets",
"the",
"AuthorizationToken",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/ecr/api.go#L2562-L2565 |
531 | aws/aws-sdk-go | service/ecr/api.go | SetProxyEndpoint | func (s *AuthorizationData) SetProxyEndpoint(v string) *AuthorizationData {
s.ProxyEndpoint = &v
return s
} | go | func (s *AuthorizationData) SetProxyEndpoint(v string) *AuthorizationData {
s.ProxyEndpoint = &v
return s
} | [
"func",
"(",
"s",
"*",
"AuthorizationData",
")",
"SetProxyEndpoint",
"(",
"v",
"string",
")",
"*",
"AuthorizationData",
"{",
"s",
".",
"ProxyEndpoint",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetProxyEndpoint sets the ProxyEndpoint field's value. | [
"SetProxyEndpoint",
"sets",
"the",
"ProxyEndpoint",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/ecr/api.go#L2574-L2577 |
532 | aws/aws-sdk-go | service/ecr/api.go | SetAcceptedMediaTypes | func (s *BatchGetImageInput) SetAcceptedMediaTypes(v []*string) *BatchGetImageInput {
s.AcceptedMediaTypes = v
return s
} | go | func (s *BatchGetImageInput) SetAcceptedMediaTypes(v []*string) *BatchGetImageInput {
s.AcceptedMediaTypes = v
return s
} | [
"func",
"(",
"s",
"*",
"BatchGetImageInput",
")",
"SetAcceptedMediaTypes",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"BatchGetImageInput",
"{",
"s",
".",
"AcceptedMediaTypes",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetAcceptedMediaTypes sets the AcceptedMediaTypes field's value. | [
"SetAcceptedMediaTypes",
"sets",
"the",
"AcceptedMediaTypes",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/ecr/api.go#L2844-L2847 |
533 | aws/aws-sdk-go | service/ecr/api.go | SetImageDetails | func (s *DescribeImagesOutput) SetImageDetails(v []*ImageDetail) *DescribeImagesOutput {
s.ImageDetails = v
return s
} | go | func (s *DescribeImagesOutput) SetImageDetails(v []*ImageDetail) *DescribeImagesOutput {
s.ImageDetails = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeImagesOutput",
")",
"SetImageDetails",
"(",
"v",
"[",
"]",
"*",
"ImageDetail",
")",
"*",
"DescribeImagesOutput",
"{",
"s",
".",
"ImageDetails",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetImageDetails sets the ImageDetails field's value. | [
"SetImageDetails",
"sets",
"the",
"ImageDetails",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/ecr/api.go#L3538-L3541 |
534 | aws/aws-sdk-go | service/ecr/api.go | SetRegistryIds | func (s *GetAuthorizationTokenInput) SetRegistryIds(v []*string) *GetAuthorizationTokenInput {
s.RegistryIds = v
return s
} | go | func (s *GetAuthorizationTokenInput) SetRegistryIds(v []*string) *GetAuthorizationTokenInput {
s.RegistryIds = v
return s
} | [
"func",
"(",
"s",
"*",
"GetAuthorizationTokenInput",
")",
"SetRegistryIds",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"GetAuthorizationTokenInput",
"{",
"s",
".",
"RegistryIds",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetRegistryIds sets the RegistryIds field's value. | [
"SetRegistryIds",
"sets",
"the",
"RegistryIds",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/ecr/api.go#L3701-L3704 |
535 | aws/aws-sdk-go | service/ecr/api.go | SetAuthorizationData | func (s *GetAuthorizationTokenOutput) SetAuthorizationData(v []*AuthorizationData) *GetAuthorizationTokenOutput {
s.AuthorizationData = v
return s
} | go | func (s *GetAuthorizationTokenOutput) SetAuthorizationData(v []*AuthorizationData) *GetAuthorizationTokenOutput {
s.AuthorizationData = v
return s
} | [
"func",
"(",
"s",
"*",
"GetAuthorizationTokenOutput",
")",
"SetAuthorizationData",
"(",
"v",
"[",
"]",
"*",
"AuthorizationData",
")",
"*",
"GetAuthorizationTokenOutput",
"{",
"s",
".",
"AuthorizationData",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetAuthorizationData sets the AuthorizationData field's value. | [
"SetAuthorizationData",
"sets",
"the",
"AuthorizationData",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/ecr/api.go#L3725-L3728 |
536 | aws/aws-sdk-go | service/ecr/api.go | SetPreviewResults | func (s *GetLifecyclePolicyPreviewOutput) SetPreviewResults(v []*LifecyclePolicyPreviewResult) *GetLifecyclePolicyPreviewOutput {
s.PreviewResults = v
return s
} | go | func (s *GetLifecyclePolicyPreviewOutput) SetPreviewResults(v []*LifecyclePolicyPreviewResult) *GetLifecyclePolicyPreviewOutput {
s.PreviewResults = v
return s
} | [
"func",
"(",
"s",
"*",
"GetLifecyclePolicyPreviewOutput",
")",
"SetPreviewResults",
"(",
"v",
"[",
"]",
"*",
"LifecyclePolicyPreviewResult",
")",
"*",
"GetLifecyclePolicyPreviewOutput",
"{",
"s",
".",
"PreviewResults",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetPreviewResults sets the PreviewResults field's value. | [
"SetPreviewResults",
"sets",
"the",
"PreviewResults",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/ecr/api.go#L4086-L4089 |
537 | aws/aws-sdk-go | service/ecr/api.go | SetImageSizeInBytes | func (s *ImageDetail) SetImageSizeInBytes(v int64) *ImageDetail {
s.ImageSizeInBytes = &v
return s
} | go | func (s *ImageDetail) SetImageSizeInBytes(v int64) *ImageDetail {
s.ImageSizeInBytes = &v
return s
} | [
"func",
"(",
"s",
"*",
"ImageDetail",
")",
"SetImageSizeInBytes",
"(",
"v",
"int64",
")",
"*",
"ImageDetail",
"{",
"s",
".",
"ImageSizeInBytes",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetImageSizeInBytes sets the ImageSizeInBytes field's value. | [
"SetImageSizeInBytes",
"sets",
"the",
"ImageSizeInBytes",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/ecr/api.go#L4310-L4313 |
538 | aws/aws-sdk-go | service/ecr/api.go | SetLayerAvailability | func (s *Layer) SetLayerAvailability(v string) *Layer {
s.LayerAvailability = &v
return s
} | go | func (s *Layer) SetLayerAvailability(v string) *Layer {
s.LayerAvailability = &v
return s
} | [
"func",
"(",
"s",
"*",
"Layer",
")",
"SetLayerAvailability",
"(",
"v",
"string",
")",
"*",
"Layer",
"{",
"s",
".",
"LayerAvailability",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetLayerAvailability sets the LayerAvailability field's value. | [
"SetLayerAvailability",
"sets",
"the",
"LayerAvailability",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/ecr/api.go#L4522-L4525 |
539 | aws/aws-sdk-go | service/ecr/api.go | SetLayerSize | func (s *Layer) SetLayerSize(v int64) *Layer {
s.LayerSize = &v
return s
} | go | func (s *Layer) SetLayerSize(v int64) *Layer {
s.LayerSize = &v
return s
} | [
"func",
"(",
"s",
"*",
"Layer",
")",
"SetLayerSize",
"(",
"v",
"int64",
")",
"*",
"Layer",
"{",
"s",
".",
"LayerSize",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetLayerSize sets the LayerSize field's value. | [
"SetLayerSize",
"sets",
"the",
"LayerSize",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/ecr/api.go#L4534-L4537 |
540 | aws/aws-sdk-go | service/ecr/api.go | SetAppliedRulePriority | func (s *LifecyclePolicyPreviewResult) SetAppliedRulePriority(v int64) *LifecyclePolicyPreviewResult {
s.AppliedRulePriority = &v
return s
} | go | func (s *LifecyclePolicyPreviewResult) SetAppliedRulePriority(v int64) *LifecyclePolicyPreviewResult {
s.AppliedRulePriority = &v
return s
} | [
"func",
"(",
"s",
"*",
"LifecyclePolicyPreviewResult",
")",
"SetAppliedRulePriority",
"(",
"v",
"int64",
")",
"*",
"LifecyclePolicyPreviewResult",
"{",
"s",
".",
"AppliedRulePriority",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetAppliedRulePriority sets the AppliedRulePriority field's value. | [
"SetAppliedRulePriority",
"sets",
"the",
"AppliedRulePriority",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/ecr/api.go#L4649-L4652 |
541 | aws/aws-sdk-go | service/ecr/api.go | SetExpiringImageTotalCount | func (s *LifecyclePolicyPreviewSummary) SetExpiringImageTotalCount(v int64) *LifecyclePolicyPreviewSummary {
s.ExpiringImageTotalCount = &v
return s
} | go | func (s *LifecyclePolicyPreviewSummary) SetExpiringImageTotalCount(v int64) *LifecyclePolicyPreviewSummary {
s.ExpiringImageTotalCount = &v
return s
} | [
"func",
"(",
"s",
"*",
"LifecyclePolicyPreviewSummary",
")",
"SetExpiringImageTotalCount",
"(",
"v",
"int64",
")",
"*",
"LifecyclePolicyPreviewSummary",
"{",
"s",
".",
"ExpiringImageTotalCount",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetExpiringImageTotalCount sets the ExpiringImageTotalCount field's value. | [
"SetExpiringImageTotalCount",
"sets",
"the",
"ExpiringImageTotalCount",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/ecr/api.go#L4691-L4694 |
542 | aws/aws-sdk-go | service/ecr/api.go | SetRepositoryArn | func (s *Repository) SetRepositoryArn(v string) *Repository {
s.RepositoryArn = &v
return s
} | go | func (s *Repository) SetRepositoryArn(v string) *Repository {
s.RepositoryArn = &v
return s
} | [
"func",
"(",
"s",
"*",
"Repository",
")",
"SetRepositoryArn",
"(",
"v",
"string",
")",
"*",
"Repository",
"{",
"s",
".",
"RepositoryArn",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetRepositoryArn sets the RepositoryArn field's value. | [
"SetRepositoryArn",
"sets",
"the",
"RepositoryArn",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/ecr/api.go#L5191-L5194 |
543 | aws/aws-sdk-go | service/ecr/api.go | SetRepositoryUri | func (s *Repository) SetRepositoryUri(v string) *Repository {
s.RepositoryUri = &v
return s
} | go | func (s *Repository) SetRepositoryUri(v string) *Repository {
s.RepositoryUri = &v
return s
} | [
"func",
"(",
"s",
"*",
"Repository",
")",
"SetRepositoryUri",
"(",
"v",
"string",
")",
"*",
"Repository",
"{",
"s",
".",
"RepositoryUri",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetRepositoryUri sets the RepositoryUri field's value. | [
"SetRepositoryUri",
"sets",
"the",
"RepositoryUri",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/ecr/api.go#L5203-L5206 |
544 | aws/aws-sdk-go | service/ecr/api.go | SetLayerPartBlob | func (s *UploadLayerPartInput) SetLayerPartBlob(v []byte) *UploadLayerPartInput {
s.LayerPartBlob = v
return s
} | go | func (s *UploadLayerPartInput) SetLayerPartBlob(v []byte) *UploadLayerPartInput {
s.LayerPartBlob = v
return s
} | [
"func",
"(",
"s",
"*",
"UploadLayerPartInput",
")",
"SetLayerPartBlob",
"(",
"v",
"[",
"]",
"byte",
")",
"*",
"UploadLayerPartInput",
"{",
"s",
".",
"LayerPartBlob",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetLayerPartBlob sets the LayerPartBlob field's value. | [
"SetLayerPartBlob",
"sets",
"the",
"LayerPartBlob",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/ecr/api.go#L5688-L5691 |
545 | aws/aws-sdk-go | service/ecr/api.go | SetPartFirstByte | func (s *UploadLayerPartInput) SetPartFirstByte(v int64) *UploadLayerPartInput {
s.PartFirstByte = &v
return s
} | go | func (s *UploadLayerPartInput) SetPartFirstByte(v int64) *UploadLayerPartInput {
s.PartFirstByte = &v
return s
} | [
"func",
"(",
"s",
"*",
"UploadLayerPartInput",
")",
"SetPartFirstByte",
"(",
"v",
"int64",
")",
"*",
"UploadLayerPartInput",
"{",
"s",
".",
"PartFirstByte",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetPartFirstByte sets the PartFirstByte field's value. | [
"SetPartFirstByte",
"sets",
"the",
"PartFirstByte",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/ecr/api.go#L5694-L5697 |
546 | aws/aws-sdk-go | service/ecr/api.go | SetPartLastByte | func (s *UploadLayerPartInput) SetPartLastByte(v int64) *UploadLayerPartInput {
s.PartLastByte = &v
return s
} | go | func (s *UploadLayerPartInput) SetPartLastByte(v int64) *UploadLayerPartInput {
s.PartLastByte = &v
return s
} | [
"func",
"(",
"s",
"*",
"UploadLayerPartInput",
")",
"SetPartLastByte",
"(",
"v",
"int64",
")",
"*",
"UploadLayerPartInput",
"{",
"s",
".",
"PartLastByte",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetPartLastByte sets the PartLastByte field's value. | [
"SetPartLastByte",
"sets",
"the",
"PartLastByte",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/ecr/api.go#L5700-L5703 |
547 | aws/aws-sdk-go | service/ecr/api.go | SetLastByteReceived | func (s *UploadLayerPartOutput) SetLastByteReceived(v int64) *UploadLayerPartOutput {
s.LastByteReceived = &v
return s
} | go | func (s *UploadLayerPartOutput) SetLastByteReceived(v int64) *UploadLayerPartOutput {
s.LastByteReceived = &v
return s
} | [
"func",
"(",
"s",
"*",
"UploadLayerPartOutput",
")",
"SetLastByteReceived",
"(",
"v",
"int64",
")",
"*",
"UploadLayerPartOutput",
"{",
"s",
".",
"LastByteReceived",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetLastByteReceived sets the LastByteReceived field's value. | [
"SetLastByteReceived",
"sets",
"the",
"LastByteReceived",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/ecr/api.go#L5750-L5753 |
548 | aws/aws-sdk-go | private/protocol/xml/xmlutil/unmarshal.go | UnmarshalXML | func UnmarshalXML(v interface{}, d *xml.Decoder, wrapper string) error {
n, err := XMLToStruct(d, nil)
if err != nil {
return err
}
if n.Children != nil {
for _, root := range n.Children {
for _, c := range root {
if wrappedChild, ok := c.Children[wrapper]; ok {
c = wrappedChild[0] // pull out wrapped element
}
err = parse(reflect.ValueOf(v), c, "")
if err != nil {
if err == io.EOF {
return nil
}
return err
}
}
}
return nil
}
return nil
} | go | func UnmarshalXML(v interface{}, d *xml.Decoder, wrapper string) error {
n, err := XMLToStruct(d, nil)
if err != nil {
return err
}
if n.Children != nil {
for _, root := range n.Children {
for _, c := range root {
if wrappedChild, ok := c.Children[wrapper]; ok {
c = wrappedChild[0] // pull out wrapped element
}
err = parse(reflect.ValueOf(v), c, "")
if err != nil {
if err == io.EOF {
return nil
}
return err
}
}
}
return nil
}
return nil
} | [
"func",
"UnmarshalXML",
"(",
"v",
"interface",
"{",
"}",
",",
"d",
"*",
"xml",
".",
"Decoder",
",",
"wrapper",
"string",
")",
"error",
"{",
"n",
",",
"err",
":=",
"XMLToStruct",
"(",
"d",
",",
"nil",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"if",
"n",
".",
"Children",
"!=",
"nil",
"{",
"for",
"_",
",",
"root",
":=",
"range",
"n",
".",
"Children",
"{",
"for",
"_",
",",
"c",
":=",
"range",
"root",
"{",
"if",
"wrappedChild",
",",
"ok",
":=",
"c",
".",
"Children",
"[",
"wrapper",
"]",
";",
"ok",
"{",
"c",
"=",
"wrappedChild",
"[",
"0",
"]",
"// pull out wrapped element",
"\n",
"}",
"\n\n",
"err",
"=",
"parse",
"(",
"reflect",
".",
"ValueOf",
"(",
"v",
")",
",",
"c",
",",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"if",
"err",
"==",
"io",
".",
"EOF",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"return",
"err",
"\n",
"}",
"\n",
"}",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}"
] | // UnmarshalXML deserializes an xml.Decoder into the container v. V
// needs to match the shape of the XML expected to be decoded.
// If the shape doesn't match unmarshaling will fail. | [
"UnmarshalXML",
"deserializes",
"an",
"xml",
".",
"Decoder",
"into",
"the",
"container",
"v",
".",
"V",
"needs",
"to",
"match",
"the",
"shape",
"of",
"the",
"XML",
"expected",
"to",
"be",
"decoded",
".",
"If",
"the",
"shape",
"doesn",
"t",
"match",
"unmarshaling",
"will",
"fail",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/protocol/xml/xmlutil/unmarshal.go#L19-L43 |
549 | aws/aws-sdk-go | private/protocol/xml/xmlutil/unmarshal.go | parse | func parse(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
rtype := r.Type()
if rtype.Kind() == reflect.Ptr {
rtype = rtype.Elem() // check kind of actual element type
}
t := tag.Get("type")
if t == "" {
switch rtype.Kind() {
case reflect.Struct:
// also it can't be a time object
if _, ok := r.Interface().(*time.Time); !ok {
t = "structure"
}
case reflect.Slice:
// also it can't be a byte slice
if _, ok := r.Interface().([]byte); !ok {
t = "list"
}
case reflect.Map:
t = "map"
}
}
switch t {
case "structure":
if field, ok := rtype.FieldByName("_"); ok {
tag = field.Tag
}
return parseStruct(r, node, tag)
case "list":
return parseList(r, node, tag)
case "map":
return parseMap(r, node, tag)
default:
return parseScalar(r, node, tag)
}
} | go | func parse(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
rtype := r.Type()
if rtype.Kind() == reflect.Ptr {
rtype = rtype.Elem() // check kind of actual element type
}
t := tag.Get("type")
if t == "" {
switch rtype.Kind() {
case reflect.Struct:
// also it can't be a time object
if _, ok := r.Interface().(*time.Time); !ok {
t = "structure"
}
case reflect.Slice:
// also it can't be a byte slice
if _, ok := r.Interface().([]byte); !ok {
t = "list"
}
case reflect.Map:
t = "map"
}
}
switch t {
case "structure":
if field, ok := rtype.FieldByName("_"); ok {
tag = field.Tag
}
return parseStruct(r, node, tag)
case "list":
return parseList(r, node, tag)
case "map":
return parseMap(r, node, tag)
default:
return parseScalar(r, node, tag)
}
} | [
"func",
"parse",
"(",
"r",
"reflect",
".",
"Value",
",",
"node",
"*",
"XMLNode",
",",
"tag",
"reflect",
".",
"StructTag",
")",
"error",
"{",
"rtype",
":=",
"r",
".",
"Type",
"(",
")",
"\n",
"if",
"rtype",
".",
"Kind",
"(",
")",
"==",
"reflect",
".",
"Ptr",
"{",
"rtype",
"=",
"rtype",
".",
"Elem",
"(",
")",
"// check kind of actual element type",
"\n",
"}",
"\n\n",
"t",
":=",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
"\n",
"if",
"t",
"==",
"\"",
"\"",
"{",
"switch",
"rtype",
".",
"Kind",
"(",
")",
"{",
"case",
"reflect",
".",
"Struct",
":",
"// also it can't be a time object",
"if",
"_",
",",
"ok",
":=",
"r",
".",
"Interface",
"(",
")",
".",
"(",
"*",
"time",
".",
"Time",
")",
";",
"!",
"ok",
"{",
"t",
"=",
"\"",
"\"",
"\n",
"}",
"\n",
"case",
"reflect",
".",
"Slice",
":",
"// also it can't be a byte slice",
"if",
"_",
",",
"ok",
":=",
"r",
".",
"Interface",
"(",
")",
".",
"(",
"[",
"]",
"byte",
")",
";",
"!",
"ok",
"{",
"t",
"=",
"\"",
"\"",
"\n",
"}",
"\n",
"case",
"reflect",
".",
"Map",
":",
"t",
"=",
"\"",
"\"",
"\n",
"}",
"\n",
"}",
"\n\n",
"switch",
"t",
"{",
"case",
"\"",
"\"",
":",
"if",
"field",
",",
"ok",
":=",
"rtype",
".",
"FieldByName",
"(",
"\"",
"\"",
")",
";",
"ok",
"{",
"tag",
"=",
"field",
".",
"Tag",
"\n",
"}",
"\n",
"return",
"parseStruct",
"(",
"r",
",",
"node",
",",
"tag",
")",
"\n",
"case",
"\"",
"\"",
":",
"return",
"parseList",
"(",
"r",
",",
"node",
",",
"tag",
")",
"\n",
"case",
"\"",
"\"",
":",
"return",
"parseMap",
"(",
"r",
",",
"node",
",",
"tag",
")",
"\n",
"default",
":",
"return",
"parseScalar",
"(",
"r",
",",
"node",
",",
"tag",
")",
"\n",
"}",
"\n",
"}"
] | // parse deserializes any value from the XMLNode. The type tag is used to infer the type, or reflect
// will be used to determine the type from r. | [
"parse",
"deserializes",
"any",
"value",
"from",
"the",
"XMLNode",
".",
"The",
"type",
"tag",
"is",
"used",
"to",
"infer",
"the",
"type",
"or",
"reflect",
"will",
"be",
"used",
"to",
"determine",
"the",
"type",
"from",
"r",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/protocol/xml/xmlutil/unmarshal.go#L47-L84 |
550 | aws/aws-sdk-go | private/protocol/xml/xmlutil/unmarshal.go | parseStruct | func parseStruct(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
t := r.Type()
if r.Kind() == reflect.Ptr {
if r.IsNil() { // create the structure if it's nil
s := reflect.New(r.Type().Elem())
r.Set(s)
r = s
}
r = r.Elem()
t = t.Elem()
}
// unwrap any payloads
if payload := tag.Get("payload"); payload != "" {
field, _ := t.FieldByName(payload)
return parseStruct(r.FieldByName(payload), node, field.Tag)
}
for i := 0; i < t.NumField(); i++ {
field := t.Field(i)
if c := field.Name[0:1]; strings.ToLower(c) == c {
continue // ignore unexported fields
}
// figure out what this field is called
name := field.Name
if field.Tag.Get("flattened") != "" && field.Tag.Get("locationNameList") != "" {
name = field.Tag.Get("locationNameList")
} else if locName := field.Tag.Get("locationName"); locName != "" {
name = locName
}
// try to find the field by name in elements
elems := node.Children[name]
if elems == nil { // try to find the field in attributes
if val, ok := node.findElem(name); ok {
elems = []*XMLNode{{Text: val}}
}
}
member := r.FieldByName(field.Name)
for _, elem := range elems {
err := parse(member, elem, field.Tag)
if err != nil {
return err
}
}
}
return nil
} | go | func parseStruct(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
t := r.Type()
if r.Kind() == reflect.Ptr {
if r.IsNil() { // create the structure if it's nil
s := reflect.New(r.Type().Elem())
r.Set(s)
r = s
}
r = r.Elem()
t = t.Elem()
}
// unwrap any payloads
if payload := tag.Get("payload"); payload != "" {
field, _ := t.FieldByName(payload)
return parseStruct(r.FieldByName(payload), node, field.Tag)
}
for i := 0; i < t.NumField(); i++ {
field := t.Field(i)
if c := field.Name[0:1]; strings.ToLower(c) == c {
continue // ignore unexported fields
}
// figure out what this field is called
name := field.Name
if field.Tag.Get("flattened") != "" && field.Tag.Get("locationNameList") != "" {
name = field.Tag.Get("locationNameList")
} else if locName := field.Tag.Get("locationName"); locName != "" {
name = locName
}
// try to find the field by name in elements
elems := node.Children[name]
if elems == nil { // try to find the field in attributes
if val, ok := node.findElem(name); ok {
elems = []*XMLNode{{Text: val}}
}
}
member := r.FieldByName(field.Name)
for _, elem := range elems {
err := parse(member, elem, field.Tag)
if err != nil {
return err
}
}
}
return nil
} | [
"func",
"parseStruct",
"(",
"r",
"reflect",
".",
"Value",
",",
"node",
"*",
"XMLNode",
",",
"tag",
"reflect",
".",
"StructTag",
")",
"error",
"{",
"t",
":=",
"r",
".",
"Type",
"(",
")",
"\n",
"if",
"r",
".",
"Kind",
"(",
")",
"==",
"reflect",
".",
"Ptr",
"{",
"if",
"r",
".",
"IsNil",
"(",
")",
"{",
"// create the structure if it's nil",
"s",
":=",
"reflect",
".",
"New",
"(",
"r",
".",
"Type",
"(",
")",
".",
"Elem",
"(",
")",
")",
"\n",
"r",
".",
"Set",
"(",
"s",
")",
"\n",
"r",
"=",
"s",
"\n",
"}",
"\n\n",
"r",
"=",
"r",
".",
"Elem",
"(",
")",
"\n",
"t",
"=",
"t",
".",
"Elem",
"(",
")",
"\n",
"}",
"\n\n",
"// unwrap any payloads",
"if",
"payload",
":=",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
";",
"payload",
"!=",
"\"",
"\"",
"{",
"field",
",",
"_",
":=",
"t",
".",
"FieldByName",
"(",
"payload",
")",
"\n",
"return",
"parseStruct",
"(",
"r",
".",
"FieldByName",
"(",
"payload",
")",
",",
"node",
",",
"field",
".",
"Tag",
")",
"\n",
"}",
"\n\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"t",
".",
"NumField",
"(",
")",
";",
"i",
"++",
"{",
"field",
":=",
"t",
".",
"Field",
"(",
"i",
")",
"\n",
"if",
"c",
":=",
"field",
".",
"Name",
"[",
"0",
":",
"1",
"]",
";",
"strings",
".",
"ToLower",
"(",
"c",
")",
"==",
"c",
"{",
"continue",
"// ignore unexported fields",
"\n",
"}",
"\n\n",
"// figure out what this field is called",
"name",
":=",
"field",
".",
"Name",
"\n",
"if",
"field",
".",
"Tag",
".",
"Get",
"(",
"\"",
"\"",
")",
"!=",
"\"",
"\"",
"&&",
"field",
".",
"Tag",
".",
"Get",
"(",
"\"",
"\"",
")",
"!=",
"\"",
"\"",
"{",
"name",
"=",
"field",
".",
"Tag",
".",
"Get",
"(",
"\"",
"\"",
")",
"\n",
"}",
"else",
"if",
"locName",
":=",
"field",
".",
"Tag",
".",
"Get",
"(",
"\"",
"\"",
")",
";",
"locName",
"!=",
"\"",
"\"",
"{",
"name",
"=",
"locName",
"\n",
"}",
"\n\n",
"// try to find the field by name in elements",
"elems",
":=",
"node",
".",
"Children",
"[",
"name",
"]",
"\n\n",
"if",
"elems",
"==",
"nil",
"{",
"// try to find the field in attributes",
"if",
"val",
",",
"ok",
":=",
"node",
".",
"findElem",
"(",
"name",
")",
";",
"ok",
"{",
"elems",
"=",
"[",
"]",
"*",
"XMLNode",
"{",
"{",
"Text",
":",
"val",
"}",
"}",
"\n",
"}",
"\n",
"}",
"\n\n",
"member",
":=",
"r",
".",
"FieldByName",
"(",
"field",
".",
"Name",
")",
"\n",
"for",
"_",
",",
"elem",
":=",
"range",
"elems",
"{",
"err",
":=",
"parse",
"(",
"member",
",",
"elem",
",",
"field",
".",
"Tag",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"}",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}"
] | // parseStruct deserializes a structure and its fields from an XMLNode. Any nested
// types in the structure will also be deserialized. | [
"parseStruct",
"deserializes",
"a",
"structure",
"and",
"its",
"fields",
"from",
"an",
"XMLNode",
".",
"Any",
"nested",
"types",
"in",
"the",
"structure",
"will",
"also",
"be",
"deserialized",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/protocol/xml/xmlutil/unmarshal.go#L88-L139 |
551 | aws/aws-sdk-go | private/protocol/xml/xmlutil/unmarshal.go | parseList | func parseList(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
t := r.Type()
if tag.Get("flattened") == "" { // look at all item entries
mname := "member"
if name := tag.Get("locationNameList"); name != "" {
mname = name
}
if Children, ok := node.Children[mname]; ok {
if r.IsNil() {
r.Set(reflect.MakeSlice(t, len(Children), len(Children)))
}
for i, c := range Children {
err := parse(r.Index(i), c, "")
if err != nil {
return err
}
}
}
} else { // flattened list means this is a single element
if r.IsNil() {
r.Set(reflect.MakeSlice(t, 0, 0))
}
childR := reflect.Zero(t.Elem())
r.Set(reflect.Append(r, childR))
err := parse(r.Index(r.Len()-1), node, "")
if err != nil {
return err
}
}
return nil
} | go | func parseList(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
t := r.Type()
if tag.Get("flattened") == "" { // look at all item entries
mname := "member"
if name := tag.Get("locationNameList"); name != "" {
mname = name
}
if Children, ok := node.Children[mname]; ok {
if r.IsNil() {
r.Set(reflect.MakeSlice(t, len(Children), len(Children)))
}
for i, c := range Children {
err := parse(r.Index(i), c, "")
if err != nil {
return err
}
}
}
} else { // flattened list means this is a single element
if r.IsNil() {
r.Set(reflect.MakeSlice(t, 0, 0))
}
childR := reflect.Zero(t.Elem())
r.Set(reflect.Append(r, childR))
err := parse(r.Index(r.Len()-1), node, "")
if err != nil {
return err
}
}
return nil
} | [
"func",
"parseList",
"(",
"r",
"reflect",
".",
"Value",
",",
"node",
"*",
"XMLNode",
",",
"tag",
"reflect",
".",
"StructTag",
")",
"error",
"{",
"t",
":=",
"r",
".",
"Type",
"(",
")",
"\n\n",
"if",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
"==",
"\"",
"\"",
"{",
"// look at all item entries",
"mname",
":=",
"\"",
"\"",
"\n",
"if",
"name",
":=",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
";",
"name",
"!=",
"\"",
"\"",
"{",
"mname",
"=",
"name",
"\n",
"}",
"\n\n",
"if",
"Children",
",",
"ok",
":=",
"node",
".",
"Children",
"[",
"mname",
"]",
";",
"ok",
"{",
"if",
"r",
".",
"IsNil",
"(",
")",
"{",
"r",
".",
"Set",
"(",
"reflect",
".",
"MakeSlice",
"(",
"t",
",",
"len",
"(",
"Children",
")",
",",
"len",
"(",
"Children",
")",
")",
")",
"\n",
"}",
"\n\n",
"for",
"i",
",",
"c",
":=",
"range",
"Children",
"{",
"err",
":=",
"parse",
"(",
"r",
".",
"Index",
"(",
"i",
")",
",",
"c",
",",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"}",
"\n",
"}",
"\n",
"}",
"else",
"{",
"// flattened list means this is a single element",
"if",
"r",
".",
"IsNil",
"(",
")",
"{",
"r",
".",
"Set",
"(",
"reflect",
".",
"MakeSlice",
"(",
"t",
",",
"0",
",",
"0",
")",
")",
"\n",
"}",
"\n\n",
"childR",
":=",
"reflect",
".",
"Zero",
"(",
"t",
".",
"Elem",
"(",
")",
")",
"\n",
"r",
".",
"Set",
"(",
"reflect",
".",
"Append",
"(",
"r",
",",
"childR",
")",
")",
"\n",
"err",
":=",
"parse",
"(",
"r",
".",
"Index",
"(",
"r",
".",
"Len",
"(",
")",
"-",
"1",
")",
",",
"node",
",",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"}",
"\n\n",
"return",
"nil",
"\n",
"}"
] | // parseList deserializes a list of values from an XML node. Each list entry
// will also be deserialized. | [
"parseList",
"deserializes",
"a",
"list",
"of",
"values",
"from",
"an",
"XML",
"node",
".",
"Each",
"list",
"entry",
"will",
"also",
"be",
"deserialized",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/protocol/xml/xmlutil/unmarshal.go#L143-L178 |
552 | aws/aws-sdk-go | private/protocol/xml/xmlutil/unmarshal.go | parseMap | func parseMap(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
if r.IsNil() {
r.Set(reflect.MakeMap(r.Type()))
}
if tag.Get("flattened") == "" { // look at all child entries
for _, entry := range node.Children["entry"] {
parseMapEntry(r, entry, tag)
}
} else { // this element is itself an entry
parseMapEntry(r, node, tag)
}
return nil
} | go | func parseMap(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
if r.IsNil() {
r.Set(reflect.MakeMap(r.Type()))
}
if tag.Get("flattened") == "" { // look at all child entries
for _, entry := range node.Children["entry"] {
parseMapEntry(r, entry, tag)
}
} else { // this element is itself an entry
parseMapEntry(r, node, tag)
}
return nil
} | [
"func",
"parseMap",
"(",
"r",
"reflect",
".",
"Value",
",",
"node",
"*",
"XMLNode",
",",
"tag",
"reflect",
".",
"StructTag",
")",
"error",
"{",
"if",
"r",
".",
"IsNil",
"(",
")",
"{",
"r",
".",
"Set",
"(",
"reflect",
".",
"MakeMap",
"(",
"r",
".",
"Type",
"(",
")",
")",
")",
"\n",
"}",
"\n\n",
"if",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
"==",
"\"",
"\"",
"{",
"// look at all child entries",
"for",
"_",
",",
"entry",
":=",
"range",
"node",
".",
"Children",
"[",
"\"",
"\"",
"]",
"{",
"parseMapEntry",
"(",
"r",
",",
"entry",
",",
"tag",
")",
"\n",
"}",
"\n",
"}",
"else",
"{",
"// this element is itself an entry",
"parseMapEntry",
"(",
"r",
",",
"node",
",",
"tag",
")",
"\n",
"}",
"\n\n",
"return",
"nil",
"\n",
"}"
] | // parseMap deserializes a map from an XMLNode. The direct children of the XMLNode
// will also be deserialized as map entries. | [
"parseMap",
"deserializes",
"a",
"map",
"from",
"an",
"XMLNode",
".",
"The",
"direct",
"children",
"of",
"the",
"XMLNode",
"will",
"also",
"be",
"deserialized",
"as",
"map",
"entries",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/protocol/xml/xmlutil/unmarshal.go#L182-L196 |
553 | aws/aws-sdk-go | private/protocol/xml/xmlutil/unmarshal.go | parseMapEntry | func parseMapEntry(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
kname, vname := "key", "value"
if n := tag.Get("locationNameKey"); n != "" {
kname = n
}
if n := tag.Get("locationNameValue"); n != "" {
vname = n
}
keys, ok := node.Children[kname]
values := node.Children[vname]
if ok {
for i, key := range keys {
keyR := reflect.ValueOf(key.Text)
value := values[i]
valueR := reflect.New(r.Type().Elem()).Elem()
parse(valueR, value, "")
r.SetMapIndex(keyR, valueR)
}
}
return nil
} | go | func parseMapEntry(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
kname, vname := "key", "value"
if n := tag.Get("locationNameKey"); n != "" {
kname = n
}
if n := tag.Get("locationNameValue"); n != "" {
vname = n
}
keys, ok := node.Children[kname]
values := node.Children[vname]
if ok {
for i, key := range keys {
keyR := reflect.ValueOf(key.Text)
value := values[i]
valueR := reflect.New(r.Type().Elem()).Elem()
parse(valueR, value, "")
r.SetMapIndex(keyR, valueR)
}
}
return nil
} | [
"func",
"parseMapEntry",
"(",
"r",
"reflect",
".",
"Value",
",",
"node",
"*",
"XMLNode",
",",
"tag",
"reflect",
".",
"StructTag",
")",
"error",
"{",
"kname",
",",
"vname",
":=",
"\"",
"\"",
",",
"\"",
"\"",
"\n",
"if",
"n",
":=",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
";",
"n",
"!=",
"\"",
"\"",
"{",
"kname",
"=",
"n",
"\n",
"}",
"\n",
"if",
"n",
":=",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
";",
"n",
"!=",
"\"",
"\"",
"{",
"vname",
"=",
"n",
"\n",
"}",
"\n\n",
"keys",
",",
"ok",
":=",
"node",
".",
"Children",
"[",
"kname",
"]",
"\n",
"values",
":=",
"node",
".",
"Children",
"[",
"vname",
"]",
"\n",
"if",
"ok",
"{",
"for",
"i",
",",
"key",
":=",
"range",
"keys",
"{",
"keyR",
":=",
"reflect",
".",
"ValueOf",
"(",
"key",
".",
"Text",
")",
"\n",
"value",
":=",
"values",
"[",
"i",
"]",
"\n",
"valueR",
":=",
"reflect",
".",
"New",
"(",
"r",
".",
"Type",
"(",
")",
".",
"Elem",
"(",
")",
")",
".",
"Elem",
"(",
")",
"\n\n",
"parse",
"(",
"valueR",
",",
"value",
",",
"\"",
"\"",
")",
"\n",
"r",
".",
"SetMapIndex",
"(",
"keyR",
",",
"valueR",
")",
"\n",
"}",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}"
] | // parseMapEntry deserializes a map entry from a XML node. | [
"parseMapEntry",
"deserializes",
"a",
"map",
"entry",
"from",
"a",
"XML",
"node",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/protocol/xml/xmlutil/unmarshal.go#L199-L221 |
554 | aws/aws-sdk-go | private/protocol/xml/xmlutil/unmarshal.go | parseScalar | func parseScalar(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
switch r.Interface().(type) {
case *string:
r.Set(reflect.ValueOf(&node.Text))
return nil
case []byte:
b, err := base64.StdEncoding.DecodeString(node.Text)
if err != nil {
return err
}
r.Set(reflect.ValueOf(b))
case *bool:
v, err := strconv.ParseBool(node.Text)
if err != nil {
return err
}
r.Set(reflect.ValueOf(&v))
case *int64:
v, err := strconv.ParseInt(node.Text, 10, 64)
if err != nil {
return err
}
r.Set(reflect.ValueOf(&v))
case *float64:
v, err := strconv.ParseFloat(node.Text, 64)
if err != nil {
return err
}
r.Set(reflect.ValueOf(&v))
case *time.Time:
format := tag.Get("timestampFormat")
if len(format) == 0 {
format = protocol.ISO8601TimeFormatName
}
t, err := protocol.ParseTime(format, node.Text)
if err != nil {
return err
}
r.Set(reflect.ValueOf(&t))
default:
return fmt.Errorf("unsupported value: %v (%s)", r.Interface(), r.Type())
}
return nil
} | go | func parseScalar(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
switch r.Interface().(type) {
case *string:
r.Set(reflect.ValueOf(&node.Text))
return nil
case []byte:
b, err := base64.StdEncoding.DecodeString(node.Text)
if err != nil {
return err
}
r.Set(reflect.ValueOf(b))
case *bool:
v, err := strconv.ParseBool(node.Text)
if err != nil {
return err
}
r.Set(reflect.ValueOf(&v))
case *int64:
v, err := strconv.ParseInt(node.Text, 10, 64)
if err != nil {
return err
}
r.Set(reflect.ValueOf(&v))
case *float64:
v, err := strconv.ParseFloat(node.Text, 64)
if err != nil {
return err
}
r.Set(reflect.ValueOf(&v))
case *time.Time:
format := tag.Get("timestampFormat")
if len(format) == 0 {
format = protocol.ISO8601TimeFormatName
}
t, err := protocol.ParseTime(format, node.Text)
if err != nil {
return err
}
r.Set(reflect.ValueOf(&t))
default:
return fmt.Errorf("unsupported value: %v (%s)", r.Interface(), r.Type())
}
return nil
} | [
"func",
"parseScalar",
"(",
"r",
"reflect",
".",
"Value",
",",
"node",
"*",
"XMLNode",
",",
"tag",
"reflect",
".",
"StructTag",
")",
"error",
"{",
"switch",
"r",
".",
"Interface",
"(",
")",
".",
"(",
"type",
")",
"{",
"case",
"*",
"string",
":",
"r",
".",
"Set",
"(",
"reflect",
".",
"ValueOf",
"(",
"&",
"node",
".",
"Text",
")",
")",
"\n",
"return",
"nil",
"\n",
"case",
"[",
"]",
"byte",
":",
"b",
",",
"err",
":=",
"base64",
".",
"StdEncoding",
".",
"DecodeString",
"(",
"node",
".",
"Text",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"r",
".",
"Set",
"(",
"reflect",
".",
"ValueOf",
"(",
"b",
")",
")",
"\n",
"case",
"*",
"bool",
":",
"v",
",",
"err",
":=",
"strconv",
".",
"ParseBool",
"(",
"node",
".",
"Text",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"r",
".",
"Set",
"(",
"reflect",
".",
"ValueOf",
"(",
"&",
"v",
")",
")",
"\n",
"case",
"*",
"int64",
":",
"v",
",",
"err",
":=",
"strconv",
".",
"ParseInt",
"(",
"node",
".",
"Text",
",",
"10",
",",
"64",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"r",
".",
"Set",
"(",
"reflect",
".",
"ValueOf",
"(",
"&",
"v",
")",
")",
"\n",
"case",
"*",
"float64",
":",
"v",
",",
"err",
":=",
"strconv",
".",
"ParseFloat",
"(",
"node",
".",
"Text",
",",
"64",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"r",
".",
"Set",
"(",
"reflect",
".",
"ValueOf",
"(",
"&",
"v",
")",
")",
"\n",
"case",
"*",
"time",
".",
"Time",
":",
"format",
":=",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
"\n",
"if",
"len",
"(",
"format",
")",
"==",
"0",
"{",
"format",
"=",
"protocol",
".",
"ISO8601TimeFormatName",
"\n",
"}",
"\n\n",
"t",
",",
"err",
":=",
"protocol",
".",
"ParseTime",
"(",
"format",
",",
"node",
".",
"Text",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"r",
".",
"Set",
"(",
"reflect",
".",
"ValueOf",
"(",
"&",
"t",
")",
")",
"\n",
"default",
":",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"r",
".",
"Interface",
"(",
")",
",",
"r",
".",
"Type",
"(",
")",
")",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}"
] | // parseScaller deserializes an XMLNode value into a concrete type based on the
// interface type of r.
//
// Error is returned if the deserialization fails due to invalid type conversion,
// or unsupported interface type. | [
"parseScaller",
"deserializes",
"an",
"XMLNode",
"value",
"into",
"a",
"concrete",
"type",
"based",
"on",
"the",
"interface",
"type",
"of",
"r",
".",
"Error",
"is",
"returned",
"if",
"the",
"deserialization",
"fails",
"due",
"to",
"invalid",
"type",
"conversion",
"or",
"unsupported",
"interface",
"type",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/protocol/xml/xmlutil/unmarshal.go#L228-L272 |
555 | aws/aws-sdk-go | aws/request/handlers.go | Copy | func (h *Handlers) Copy() Handlers {
return Handlers{
Validate: h.Validate.copy(),
Build: h.Build.copy(),
Sign: h.Sign.copy(),
Send: h.Send.copy(),
ValidateResponse: h.ValidateResponse.copy(),
Unmarshal: h.Unmarshal.copy(),
UnmarshalStream: h.UnmarshalStream.copy(),
UnmarshalError: h.UnmarshalError.copy(),
UnmarshalMeta: h.UnmarshalMeta.copy(),
Retry: h.Retry.copy(),
AfterRetry: h.AfterRetry.copy(),
CompleteAttempt: h.CompleteAttempt.copy(),
Complete: h.Complete.copy(),
}
} | go | func (h *Handlers) Copy() Handlers {
return Handlers{
Validate: h.Validate.copy(),
Build: h.Build.copy(),
Sign: h.Sign.copy(),
Send: h.Send.copy(),
ValidateResponse: h.ValidateResponse.copy(),
Unmarshal: h.Unmarshal.copy(),
UnmarshalStream: h.UnmarshalStream.copy(),
UnmarshalError: h.UnmarshalError.copy(),
UnmarshalMeta: h.UnmarshalMeta.copy(),
Retry: h.Retry.copy(),
AfterRetry: h.AfterRetry.copy(),
CompleteAttempt: h.CompleteAttempt.copy(),
Complete: h.Complete.copy(),
}
} | [
"func",
"(",
"h",
"*",
"Handlers",
")",
"Copy",
"(",
")",
"Handlers",
"{",
"return",
"Handlers",
"{",
"Validate",
":",
"h",
".",
"Validate",
".",
"copy",
"(",
")",
",",
"Build",
":",
"h",
".",
"Build",
".",
"copy",
"(",
")",
",",
"Sign",
":",
"h",
".",
"Sign",
".",
"copy",
"(",
")",
",",
"Send",
":",
"h",
".",
"Send",
".",
"copy",
"(",
")",
",",
"ValidateResponse",
":",
"h",
".",
"ValidateResponse",
".",
"copy",
"(",
")",
",",
"Unmarshal",
":",
"h",
".",
"Unmarshal",
".",
"copy",
"(",
")",
",",
"UnmarshalStream",
":",
"h",
".",
"UnmarshalStream",
".",
"copy",
"(",
")",
",",
"UnmarshalError",
":",
"h",
".",
"UnmarshalError",
".",
"copy",
"(",
")",
",",
"UnmarshalMeta",
":",
"h",
".",
"UnmarshalMeta",
".",
"copy",
"(",
")",
",",
"Retry",
":",
"h",
".",
"Retry",
".",
"copy",
"(",
")",
",",
"AfterRetry",
":",
"h",
".",
"AfterRetry",
".",
"copy",
"(",
")",
",",
"CompleteAttempt",
":",
"h",
".",
"CompleteAttempt",
".",
"copy",
"(",
")",
",",
"Complete",
":",
"h",
".",
"Complete",
".",
"copy",
"(",
")",
",",
"}",
"\n",
"}"
] | // Copy returns of this handler's lists. | [
"Copy",
"returns",
"of",
"this",
"handler",
"s",
"lists",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/request/handlers.go#L27-L43 |
556 | aws/aws-sdk-go | aws/request/handlers.go | Clear | func (h *Handlers) Clear() {
h.Validate.Clear()
h.Build.Clear()
h.Send.Clear()
h.Sign.Clear()
h.Unmarshal.Clear()
h.UnmarshalStream.Clear()
h.UnmarshalMeta.Clear()
h.UnmarshalError.Clear()
h.ValidateResponse.Clear()
h.Retry.Clear()
h.AfterRetry.Clear()
h.CompleteAttempt.Clear()
h.Complete.Clear()
} | go | func (h *Handlers) Clear() {
h.Validate.Clear()
h.Build.Clear()
h.Send.Clear()
h.Sign.Clear()
h.Unmarshal.Clear()
h.UnmarshalStream.Clear()
h.UnmarshalMeta.Clear()
h.UnmarshalError.Clear()
h.ValidateResponse.Clear()
h.Retry.Clear()
h.AfterRetry.Clear()
h.CompleteAttempt.Clear()
h.Complete.Clear()
} | [
"func",
"(",
"h",
"*",
"Handlers",
")",
"Clear",
"(",
")",
"{",
"h",
".",
"Validate",
".",
"Clear",
"(",
")",
"\n",
"h",
".",
"Build",
".",
"Clear",
"(",
")",
"\n",
"h",
".",
"Send",
".",
"Clear",
"(",
")",
"\n",
"h",
".",
"Sign",
".",
"Clear",
"(",
")",
"\n",
"h",
".",
"Unmarshal",
".",
"Clear",
"(",
")",
"\n",
"h",
".",
"UnmarshalStream",
".",
"Clear",
"(",
")",
"\n",
"h",
".",
"UnmarshalMeta",
".",
"Clear",
"(",
")",
"\n",
"h",
".",
"UnmarshalError",
".",
"Clear",
"(",
")",
"\n",
"h",
".",
"ValidateResponse",
".",
"Clear",
"(",
")",
"\n",
"h",
".",
"Retry",
".",
"Clear",
"(",
")",
"\n",
"h",
".",
"AfterRetry",
".",
"Clear",
"(",
")",
"\n",
"h",
".",
"CompleteAttempt",
".",
"Clear",
"(",
")",
"\n",
"h",
".",
"Complete",
".",
"Clear",
"(",
")",
"\n",
"}"
] | // Clear removes callback functions for all handlers | [
"Clear",
"removes",
"callback",
"functions",
"for",
"all",
"handlers"
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/request/handlers.go#L46-L60 |
557 | aws/aws-sdk-go | aws/request/handlers.go | copy | func (l *HandlerList) copy() HandlerList {
n := HandlerList{
AfterEachFn: l.AfterEachFn,
}
if len(l.list) == 0 {
return n
}
n.list = append(make([]NamedHandler, 0, len(l.list)), l.list...)
return n
} | go | func (l *HandlerList) copy() HandlerList {
n := HandlerList{
AfterEachFn: l.AfterEachFn,
}
if len(l.list) == 0 {
return n
}
n.list = append(make([]NamedHandler, 0, len(l.list)), l.list...)
return n
} | [
"func",
"(",
"l",
"*",
"HandlerList",
")",
"copy",
"(",
")",
"HandlerList",
"{",
"n",
":=",
"HandlerList",
"{",
"AfterEachFn",
":",
"l",
".",
"AfterEachFn",
",",
"}",
"\n",
"if",
"len",
"(",
"l",
".",
"list",
")",
"==",
"0",
"{",
"return",
"n",
"\n",
"}",
"\n\n",
"n",
".",
"list",
"=",
"append",
"(",
"make",
"(",
"[",
"]",
"NamedHandler",
",",
"0",
",",
"len",
"(",
"l",
".",
"list",
")",
")",
",",
"l",
".",
"list",
"...",
")",
"\n",
"return",
"n",
"\n",
"}"
] | // copy creates a copy of the handler list. | [
"copy",
"creates",
"a",
"copy",
"of",
"the",
"handler",
"list",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/request/handlers.go#L93-L103 |
558 | aws/aws-sdk-go | aws/request/handlers.go | PushBackNamed | func (l *HandlerList) PushBackNamed(n NamedHandler) {
if cap(l.list) == 0 {
l.list = make([]NamedHandler, 0, 5)
}
l.list = append(l.list, n)
} | go | func (l *HandlerList) PushBackNamed(n NamedHandler) {
if cap(l.list) == 0 {
l.list = make([]NamedHandler, 0, 5)
}
l.list = append(l.list, n)
} | [
"func",
"(",
"l",
"*",
"HandlerList",
")",
"PushBackNamed",
"(",
"n",
"NamedHandler",
")",
"{",
"if",
"cap",
"(",
"l",
".",
"list",
")",
"==",
"0",
"{",
"l",
".",
"list",
"=",
"make",
"(",
"[",
"]",
"NamedHandler",
",",
"0",
",",
"5",
")",
"\n",
"}",
"\n",
"l",
".",
"list",
"=",
"append",
"(",
"l",
".",
"list",
",",
"n",
")",
"\n",
"}"
] | // PushBackNamed pushes named handler f to the back of the handler list. | [
"PushBackNamed",
"pushes",
"named",
"handler",
"f",
"to",
"the",
"back",
"of",
"the",
"handler",
"list",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/request/handlers.go#L121-L126 |
559 | aws/aws-sdk-go | aws/request/handlers.go | PushFrontNamed | func (l *HandlerList) PushFrontNamed(n NamedHandler) {
if cap(l.list) == len(l.list) {
// Allocating new list required
l.list = append([]NamedHandler{n}, l.list...)
} else {
// Enough room to prepend into list.
l.list = append(l.list, NamedHandler{})
copy(l.list[1:], l.list)
l.list[0] = n
}
} | go | func (l *HandlerList) PushFrontNamed(n NamedHandler) {
if cap(l.list) == len(l.list) {
// Allocating new list required
l.list = append([]NamedHandler{n}, l.list...)
} else {
// Enough room to prepend into list.
l.list = append(l.list, NamedHandler{})
copy(l.list[1:], l.list)
l.list[0] = n
}
} | [
"func",
"(",
"l",
"*",
"HandlerList",
")",
"PushFrontNamed",
"(",
"n",
"NamedHandler",
")",
"{",
"if",
"cap",
"(",
"l",
".",
"list",
")",
"==",
"len",
"(",
"l",
".",
"list",
")",
"{",
"// Allocating new list required",
"l",
".",
"list",
"=",
"append",
"(",
"[",
"]",
"NamedHandler",
"{",
"n",
"}",
",",
"l",
".",
"list",
"...",
")",
"\n",
"}",
"else",
"{",
"// Enough room to prepend into list.",
"l",
".",
"list",
"=",
"append",
"(",
"l",
".",
"list",
",",
"NamedHandler",
"{",
"}",
")",
"\n",
"copy",
"(",
"l",
".",
"list",
"[",
"1",
":",
"]",
",",
"l",
".",
"list",
")",
"\n",
"l",
".",
"list",
"[",
"0",
"]",
"=",
"n",
"\n",
"}",
"\n",
"}"
] | // PushFrontNamed pushes named handler f to the front of the handler list. | [
"PushFrontNamed",
"pushes",
"named",
"handler",
"f",
"to",
"the",
"front",
"of",
"the",
"handler",
"list",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/request/handlers.go#L134-L144 |
560 | aws/aws-sdk-go | aws/request/handlers.go | RemoveByName | func (l *HandlerList) RemoveByName(name string) {
for i := 0; i < len(l.list); i++ {
m := l.list[i]
if m.Name == name {
// Shift array preventing creating new arrays
copy(l.list[i:], l.list[i+1:])
l.list[len(l.list)-1] = NamedHandler{}
l.list = l.list[:len(l.list)-1]
// decrement list so next check to length is correct
i--
}
}
} | go | func (l *HandlerList) RemoveByName(name string) {
for i := 0; i < len(l.list); i++ {
m := l.list[i]
if m.Name == name {
// Shift array preventing creating new arrays
copy(l.list[i:], l.list[i+1:])
l.list[len(l.list)-1] = NamedHandler{}
l.list = l.list[:len(l.list)-1]
// decrement list so next check to length is correct
i--
}
}
} | [
"func",
"(",
"l",
"*",
"HandlerList",
")",
"RemoveByName",
"(",
"name",
"string",
")",
"{",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"len",
"(",
"l",
".",
"list",
")",
";",
"i",
"++",
"{",
"m",
":=",
"l",
".",
"list",
"[",
"i",
"]",
"\n",
"if",
"m",
".",
"Name",
"==",
"name",
"{",
"// Shift array preventing creating new arrays",
"copy",
"(",
"l",
".",
"list",
"[",
"i",
":",
"]",
",",
"l",
".",
"list",
"[",
"i",
"+",
"1",
":",
"]",
")",
"\n",
"l",
".",
"list",
"[",
"len",
"(",
"l",
".",
"list",
")",
"-",
"1",
"]",
"=",
"NamedHandler",
"{",
"}",
"\n",
"l",
".",
"list",
"=",
"l",
".",
"list",
"[",
":",
"len",
"(",
"l",
".",
"list",
")",
"-",
"1",
"]",
"\n\n",
"// decrement list so next check to length is correct",
"i",
"--",
"\n",
"}",
"\n",
"}",
"\n",
"}"
] | // RemoveByName removes a NamedHandler by name. | [
"RemoveByName",
"removes",
"a",
"NamedHandler",
"by",
"name",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/request/handlers.go#L152-L165 |
561 | aws/aws-sdk-go | aws/request/handlers.go | SwapNamed | func (l *HandlerList) SwapNamed(n NamedHandler) (swapped bool) {
for i := 0; i < len(l.list); i++ {
if l.list[i].Name == n.Name {
l.list[i].Fn = n.Fn
swapped = true
}
}
return swapped
} | go | func (l *HandlerList) SwapNamed(n NamedHandler) (swapped bool) {
for i := 0; i < len(l.list); i++ {
if l.list[i].Name == n.Name {
l.list[i].Fn = n.Fn
swapped = true
}
}
return swapped
} | [
"func",
"(",
"l",
"*",
"HandlerList",
")",
"SwapNamed",
"(",
"n",
"NamedHandler",
")",
"(",
"swapped",
"bool",
")",
"{",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"len",
"(",
"l",
".",
"list",
")",
";",
"i",
"++",
"{",
"if",
"l",
".",
"list",
"[",
"i",
"]",
".",
"Name",
"==",
"n",
".",
"Name",
"{",
"l",
".",
"list",
"[",
"i",
"]",
".",
"Fn",
"=",
"n",
".",
"Fn",
"\n",
"swapped",
"=",
"true",
"\n",
"}",
"\n",
"}",
"\n\n",
"return",
"swapped",
"\n",
"}"
] | // SwapNamed will swap out any existing handlers with the same name as the
// passed in NamedHandler returning true if handlers were swapped. False is
// returned otherwise. | [
"SwapNamed",
"will",
"swap",
"out",
"any",
"existing",
"handlers",
"with",
"the",
"same",
"name",
"as",
"the",
"passed",
"in",
"NamedHandler",
"returning",
"true",
"if",
"handlers",
"were",
"swapped",
".",
"False",
"is",
"returned",
"otherwise",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/request/handlers.go#L170-L179 |
562 | aws/aws-sdk-go | aws/request/handlers.go | Swap | func (l *HandlerList) Swap(name string, replace NamedHandler) bool {
var swapped bool
for i := 0; i < len(l.list); i++ {
if l.list[i].Name == name {
l.list[i] = replace
swapped = true
}
}
return swapped
} | go | func (l *HandlerList) Swap(name string, replace NamedHandler) bool {
var swapped bool
for i := 0; i < len(l.list); i++ {
if l.list[i].Name == name {
l.list[i] = replace
swapped = true
}
}
return swapped
} | [
"func",
"(",
"l",
"*",
"HandlerList",
")",
"Swap",
"(",
"name",
"string",
",",
"replace",
"NamedHandler",
")",
"bool",
"{",
"var",
"swapped",
"bool",
"\n\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"len",
"(",
"l",
".",
"list",
")",
";",
"i",
"++",
"{",
"if",
"l",
".",
"list",
"[",
"i",
"]",
".",
"Name",
"==",
"name",
"{",
"l",
".",
"list",
"[",
"i",
"]",
"=",
"replace",
"\n",
"swapped",
"=",
"true",
"\n",
"}",
"\n",
"}",
"\n\n",
"return",
"swapped",
"\n",
"}"
] | // Swap will swap out all handlers matching the name passed in. The matched
// handlers will be swapped in. True is returned if the handlers were swapped. | [
"Swap",
"will",
"swap",
"out",
"all",
"handlers",
"matching",
"the",
"name",
"passed",
"in",
".",
"The",
"matched",
"handlers",
"will",
"be",
"swapped",
"in",
".",
"True",
"is",
"returned",
"if",
"the",
"handlers",
"were",
"swapped",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/request/handlers.go#L183-L194 |
563 | aws/aws-sdk-go | aws/request/handlers.go | SetBackNamed | func (l *HandlerList) SetBackNamed(n NamedHandler) {
if !l.SwapNamed(n) {
l.PushBackNamed(n)
}
} | go | func (l *HandlerList) SetBackNamed(n NamedHandler) {
if !l.SwapNamed(n) {
l.PushBackNamed(n)
}
} | [
"func",
"(",
"l",
"*",
"HandlerList",
")",
"SetBackNamed",
"(",
"n",
"NamedHandler",
")",
"{",
"if",
"!",
"l",
".",
"SwapNamed",
"(",
"n",
")",
"{",
"l",
".",
"PushBackNamed",
"(",
"n",
")",
"\n",
"}",
"\n",
"}"
] | // SetBackNamed will replace the named handler if it exists in the handler list.
// If the handler does not exist the handler will be added to the end of the list. | [
"SetBackNamed",
"will",
"replace",
"the",
"named",
"handler",
"if",
"it",
"exists",
"in",
"the",
"handler",
"list",
".",
"If",
"the",
"handler",
"does",
"not",
"exist",
"the",
"handler",
"will",
"be",
"added",
"to",
"the",
"end",
"of",
"the",
"list",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/request/handlers.go#L198-L202 |
564 | aws/aws-sdk-go | aws/request/handlers.go | SetFrontNamed | func (l *HandlerList) SetFrontNamed(n NamedHandler) {
if !l.SwapNamed(n) {
l.PushFrontNamed(n)
}
} | go | func (l *HandlerList) SetFrontNamed(n NamedHandler) {
if !l.SwapNamed(n) {
l.PushFrontNamed(n)
}
} | [
"func",
"(",
"l",
"*",
"HandlerList",
")",
"SetFrontNamed",
"(",
"n",
"NamedHandler",
")",
"{",
"if",
"!",
"l",
".",
"SwapNamed",
"(",
"n",
")",
"{",
"l",
".",
"PushFrontNamed",
"(",
"n",
")",
"\n",
"}",
"\n",
"}"
] | // SetFrontNamed will replace the named handler if it exists in the handler list.
// If the handler does not exist the handler will be added to the beginning of
// the list. | [
"SetFrontNamed",
"will",
"replace",
"the",
"named",
"handler",
"if",
"it",
"exists",
"in",
"the",
"handler",
"list",
".",
"If",
"the",
"handler",
"does",
"not",
"exist",
"the",
"handler",
"will",
"be",
"added",
"to",
"the",
"beginning",
"of",
"the",
"list",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/request/handlers.go#L207-L211 |
565 | aws/aws-sdk-go | aws/request/handlers.go | Run | func (l *HandlerList) Run(r *Request) {
for i, h := range l.list {
h.Fn(r)
item := HandlerListRunItem{
Index: i, Handler: h, Request: r,
}
if l.AfterEachFn != nil && !l.AfterEachFn(item) {
return
}
}
} | go | func (l *HandlerList) Run(r *Request) {
for i, h := range l.list {
h.Fn(r)
item := HandlerListRunItem{
Index: i, Handler: h, Request: r,
}
if l.AfterEachFn != nil && !l.AfterEachFn(item) {
return
}
}
} | [
"func",
"(",
"l",
"*",
"HandlerList",
")",
"Run",
"(",
"r",
"*",
"Request",
")",
"{",
"for",
"i",
",",
"h",
":=",
"range",
"l",
".",
"list",
"{",
"h",
".",
"Fn",
"(",
"r",
")",
"\n",
"item",
":=",
"HandlerListRunItem",
"{",
"Index",
":",
"i",
",",
"Handler",
":",
"h",
",",
"Request",
":",
"r",
",",
"}",
"\n",
"if",
"l",
".",
"AfterEachFn",
"!=",
"nil",
"&&",
"!",
"l",
".",
"AfterEachFn",
"(",
"item",
")",
"{",
"return",
"\n",
"}",
"\n",
"}",
"\n",
"}"
] | // Run executes all handlers in the list with a given request object. | [
"Run",
"executes",
"all",
"handlers",
"in",
"the",
"list",
"with",
"a",
"given",
"request",
"object",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/request/handlers.go#L214-L224 |
566 | aws/aws-sdk-go | aws/request/handlers.go | HandlerListLogItem | func HandlerListLogItem(item HandlerListRunItem) bool {
if item.Request.Config.Logger == nil {
return true
}
item.Request.Config.Logger.Log("DEBUG: RequestHandler",
item.Index, item.Handler.Name, item.Request.Error)
return true
} | go | func HandlerListLogItem(item HandlerListRunItem) bool {
if item.Request.Config.Logger == nil {
return true
}
item.Request.Config.Logger.Log("DEBUG: RequestHandler",
item.Index, item.Handler.Name, item.Request.Error)
return true
} | [
"func",
"HandlerListLogItem",
"(",
"item",
"HandlerListRunItem",
")",
"bool",
"{",
"if",
"item",
".",
"Request",
".",
"Config",
".",
"Logger",
"==",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n",
"item",
".",
"Request",
".",
"Config",
".",
"Logger",
".",
"Log",
"(",
"\"",
"\"",
",",
"item",
".",
"Index",
",",
"item",
".",
"Handler",
".",
"Name",
",",
"item",
".",
"Request",
".",
"Error",
")",
"\n\n",
"return",
"true",
"\n",
"}"
] | // HandlerListLogItem logs the request handler and the state of the
// request's Error value. Always returns true to continue iterating
// request handlers in a HandlerList. | [
"HandlerListLogItem",
"logs",
"the",
"request",
"handler",
"and",
"the",
"state",
"of",
"the",
"request",
"s",
"Error",
"value",
".",
"Always",
"returns",
"true",
"to",
"continue",
"iterating",
"request",
"handlers",
"in",
"a",
"HandlerList",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/request/handlers.go#L229-L237 |
567 | aws/aws-sdk-go | aws/request/handlers.go | WithAppendUserAgent | func WithAppendUserAgent(s string) Option {
return func(r *Request) {
r.Handlers.Build.PushBack(func(r2 *Request) {
AddToUserAgent(r, s)
})
}
} | go | func WithAppendUserAgent(s string) Option {
return func(r *Request) {
r.Handlers.Build.PushBack(func(r2 *Request) {
AddToUserAgent(r, s)
})
}
} | [
"func",
"WithAppendUserAgent",
"(",
"s",
"string",
")",
"Option",
"{",
"return",
"func",
"(",
"r",
"*",
"Request",
")",
"{",
"r",
".",
"Handlers",
".",
"Build",
".",
"PushBack",
"(",
"func",
"(",
"r2",
"*",
"Request",
")",
"{",
"AddToUserAgent",
"(",
"r",
",",
"s",
")",
"\n",
"}",
")",
"\n",
"}",
"\n",
"}"
] | // WithAppendUserAgent will add a string to the user agent prefixed with a
// single white space. | [
"WithAppendUserAgent",
"will",
"add",
"a",
"string",
"to",
"the",
"user",
"agent",
"prefixed",
"with",
"a",
"single",
"white",
"space",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/request/handlers.go#L248-L254 |
568 | aws/aws-sdk-go | private/protocol/xml/xmlutil/build.go | BuildXML | func BuildXML(params interface{}, e *xml.Encoder) error {
return buildXML(params, e, false)
} | go | func BuildXML(params interface{}, e *xml.Encoder) error {
return buildXML(params, e, false)
} | [
"func",
"BuildXML",
"(",
"params",
"interface",
"{",
"}",
",",
"e",
"*",
"xml",
".",
"Encoder",
")",
"error",
"{",
"return",
"buildXML",
"(",
"params",
",",
"e",
",",
"false",
")",
"\n",
"}"
] | // BuildXML will serialize params into an xml.Encoder. Error will be returned
// if the serialization of any of the params or nested values fails. | [
"BuildXML",
"will",
"serialize",
"params",
"into",
"an",
"xml",
".",
"Encoder",
".",
"Error",
"will",
"be",
"returned",
"if",
"the",
"serialization",
"of",
"any",
"of",
"the",
"params",
"or",
"nested",
"values",
"fails",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/protocol/xml/xmlutil/build.go#L18-L20 |
569 | aws/aws-sdk-go | private/protocol/xml/xmlutil/build.go | elemOf | func elemOf(value reflect.Value) reflect.Value {
for value.Kind() == reflect.Ptr {
value = value.Elem()
}
return value
} | go | func elemOf(value reflect.Value) reflect.Value {
for value.Kind() == reflect.Ptr {
value = value.Elem()
}
return value
} | [
"func",
"elemOf",
"(",
"value",
"reflect",
".",
"Value",
")",
"reflect",
".",
"Value",
"{",
"for",
"value",
".",
"Kind",
"(",
")",
"==",
"reflect",
".",
"Ptr",
"{",
"value",
"=",
"value",
".",
"Elem",
"(",
")",
"\n",
"}",
"\n",
"return",
"value",
"\n",
"}"
] | // Returns the reflection element of a value, if it is a pointer. | [
"Returns",
"the",
"reflection",
"element",
"of",
"a",
"value",
"if",
"it",
"is",
"a",
"pointer",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/protocol/xml/xmlutil/build.go#L37-L42 |
570 | aws/aws-sdk-go | private/protocol/xml/xmlutil/build.go | buildValue | func (b *xmlBuilder) buildValue(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
value = elemOf(value)
if !value.IsValid() { // no need to handle zero values
return nil
} else if tag.Get("location") != "" { // don't handle non-body location values
return nil
}
t := tag.Get("type")
if t == "" {
switch value.Kind() {
case reflect.Struct:
t = "structure"
case reflect.Slice:
t = "list"
case reflect.Map:
t = "map"
}
}
switch t {
case "structure":
if field, ok := value.Type().FieldByName("_"); ok {
tag = tag + reflect.StructTag(" ") + field.Tag
}
return b.buildStruct(value, current, tag)
case "list":
return b.buildList(value, current, tag)
case "map":
return b.buildMap(value, current, tag)
default:
return b.buildScalar(value, current, tag)
}
} | go | func (b *xmlBuilder) buildValue(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
value = elemOf(value)
if !value.IsValid() { // no need to handle zero values
return nil
} else if tag.Get("location") != "" { // don't handle non-body location values
return nil
}
t := tag.Get("type")
if t == "" {
switch value.Kind() {
case reflect.Struct:
t = "structure"
case reflect.Slice:
t = "list"
case reflect.Map:
t = "map"
}
}
switch t {
case "structure":
if field, ok := value.Type().FieldByName("_"); ok {
tag = tag + reflect.StructTag(" ") + field.Tag
}
return b.buildStruct(value, current, tag)
case "list":
return b.buildList(value, current, tag)
case "map":
return b.buildMap(value, current, tag)
default:
return b.buildScalar(value, current, tag)
}
} | [
"func",
"(",
"b",
"*",
"xmlBuilder",
")",
"buildValue",
"(",
"value",
"reflect",
".",
"Value",
",",
"current",
"*",
"XMLNode",
",",
"tag",
"reflect",
".",
"StructTag",
")",
"error",
"{",
"value",
"=",
"elemOf",
"(",
"value",
")",
"\n",
"if",
"!",
"value",
".",
"IsValid",
"(",
")",
"{",
"// no need to handle zero values",
"return",
"nil",
"\n",
"}",
"else",
"if",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
"!=",
"\"",
"\"",
"{",
"// don't handle non-body location values",
"return",
"nil",
"\n",
"}",
"\n\n",
"t",
":=",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
"\n",
"if",
"t",
"==",
"\"",
"\"",
"{",
"switch",
"value",
".",
"Kind",
"(",
")",
"{",
"case",
"reflect",
".",
"Struct",
":",
"t",
"=",
"\"",
"\"",
"\n",
"case",
"reflect",
".",
"Slice",
":",
"t",
"=",
"\"",
"\"",
"\n",
"case",
"reflect",
".",
"Map",
":",
"t",
"=",
"\"",
"\"",
"\n",
"}",
"\n",
"}",
"\n\n",
"switch",
"t",
"{",
"case",
"\"",
"\"",
":",
"if",
"field",
",",
"ok",
":=",
"value",
".",
"Type",
"(",
")",
".",
"FieldByName",
"(",
"\"",
"\"",
")",
";",
"ok",
"{",
"tag",
"=",
"tag",
"+",
"reflect",
".",
"StructTag",
"(",
"\"",
"\"",
")",
"+",
"field",
".",
"Tag",
"\n",
"}",
"\n",
"return",
"b",
".",
"buildStruct",
"(",
"value",
",",
"current",
",",
"tag",
")",
"\n",
"case",
"\"",
"\"",
":",
"return",
"b",
".",
"buildList",
"(",
"value",
",",
"current",
",",
"tag",
")",
"\n",
"case",
"\"",
"\"",
":",
"return",
"b",
".",
"buildMap",
"(",
"value",
",",
"current",
",",
"tag",
")",
"\n",
"default",
":",
"return",
"b",
".",
"buildScalar",
"(",
"value",
",",
"current",
",",
"tag",
")",
"\n",
"}",
"\n",
"}"
] | // buildValue generic XMLNode builder for any type. Will build value for their specific type
// struct, list, map, scalar.
//
// Also takes a "type" tag value to set what type a value should be converted to XMLNode as. If
// type is not provided reflect will be used to determine the value's type. | [
"buildValue",
"generic",
"XMLNode",
"builder",
"for",
"any",
"type",
".",
"Will",
"build",
"value",
"for",
"their",
"specific",
"type",
"struct",
"list",
"map",
"scalar",
".",
"Also",
"takes",
"a",
"type",
"tag",
"value",
"to",
"set",
"what",
"type",
"a",
"value",
"should",
"be",
"converted",
"to",
"XMLNode",
"as",
".",
"If",
"type",
"is",
"not",
"provided",
"reflect",
"will",
"be",
"used",
"to",
"determine",
"the",
"value",
"s",
"type",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/protocol/xml/xmlutil/build.go#L55-L88 |
571 | aws/aws-sdk-go | private/protocol/xml/xmlutil/build.go | buildStruct | func (b *xmlBuilder) buildStruct(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
if !value.IsValid() {
return nil
}
// unwrap payloads
if payload := tag.Get("payload"); payload != "" {
field, _ := value.Type().FieldByName(payload)
tag = field.Tag
value = elemOf(value.FieldByName(payload))
if !value.IsValid() {
return nil
}
}
child := NewXMLElement(xml.Name{Local: tag.Get("locationName")})
// there is an xmlNamespace associated with this struct
if prefix, uri := tag.Get("xmlPrefix"), tag.Get("xmlURI"); uri != "" {
ns := xml.Attr{
Name: xml.Name{Local: "xmlns"},
Value: uri,
}
if prefix != "" {
b.namespaces[prefix] = uri // register the namespace
ns.Name.Local = "xmlns:" + prefix
}
child.Attr = append(child.Attr, ns)
}
var payloadFields, nonPayloadFields int
t := value.Type()
for i := 0; i < value.NumField(); i++ {
member := elemOf(value.Field(i))
field := t.Field(i)
if field.PkgPath != "" {
continue // ignore unexported fields
}
if field.Tag.Get("ignore") != "" {
continue
}
mTag := field.Tag
if mTag.Get("location") != "" { // skip non-body members
nonPayloadFields++
continue
}
payloadFields++
if protocol.CanSetIdempotencyToken(value.Field(i), field) {
token := protocol.GetIdempotencyToken()
member = reflect.ValueOf(token)
}
memberName := mTag.Get("locationName")
if memberName == "" {
memberName = field.Name
mTag = reflect.StructTag(string(mTag) + ` locationName:"` + memberName + `"`)
}
if err := b.buildValue(member, child, mTag); err != nil {
return err
}
}
// Only case where the child shape is not added is if the shape only contains
// non-payload fields, e.g headers/query.
if !(payloadFields == 0 && nonPayloadFields > 0) {
current.AddChild(child)
}
return nil
} | go | func (b *xmlBuilder) buildStruct(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
if !value.IsValid() {
return nil
}
// unwrap payloads
if payload := tag.Get("payload"); payload != "" {
field, _ := value.Type().FieldByName(payload)
tag = field.Tag
value = elemOf(value.FieldByName(payload))
if !value.IsValid() {
return nil
}
}
child := NewXMLElement(xml.Name{Local: tag.Get("locationName")})
// there is an xmlNamespace associated with this struct
if prefix, uri := tag.Get("xmlPrefix"), tag.Get("xmlURI"); uri != "" {
ns := xml.Attr{
Name: xml.Name{Local: "xmlns"},
Value: uri,
}
if prefix != "" {
b.namespaces[prefix] = uri // register the namespace
ns.Name.Local = "xmlns:" + prefix
}
child.Attr = append(child.Attr, ns)
}
var payloadFields, nonPayloadFields int
t := value.Type()
for i := 0; i < value.NumField(); i++ {
member := elemOf(value.Field(i))
field := t.Field(i)
if field.PkgPath != "" {
continue // ignore unexported fields
}
if field.Tag.Get("ignore") != "" {
continue
}
mTag := field.Tag
if mTag.Get("location") != "" { // skip non-body members
nonPayloadFields++
continue
}
payloadFields++
if protocol.CanSetIdempotencyToken(value.Field(i), field) {
token := protocol.GetIdempotencyToken()
member = reflect.ValueOf(token)
}
memberName := mTag.Get("locationName")
if memberName == "" {
memberName = field.Name
mTag = reflect.StructTag(string(mTag) + ` locationName:"` + memberName + `"`)
}
if err := b.buildValue(member, child, mTag); err != nil {
return err
}
}
// Only case where the child shape is not added is if the shape only contains
// non-payload fields, e.g headers/query.
if !(payloadFields == 0 && nonPayloadFields > 0) {
current.AddChild(child)
}
return nil
} | [
"func",
"(",
"b",
"*",
"xmlBuilder",
")",
"buildStruct",
"(",
"value",
"reflect",
".",
"Value",
",",
"current",
"*",
"XMLNode",
",",
"tag",
"reflect",
".",
"StructTag",
")",
"error",
"{",
"if",
"!",
"value",
".",
"IsValid",
"(",
")",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"// unwrap payloads",
"if",
"payload",
":=",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
";",
"payload",
"!=",
"\"",
"\"",
"{",
"field",
",",
"_",
":=",
"value",
".",
"Type",
"(",
")",
".",
"FieldByName",
"(",
"payload",
")",
"\n",
"tag",
"=",
"field",
".",
"Tag",
"\n",
"value",
"=",
"elemOf",
"(",
"value",
".",
"FieldByName",
"(",
"payload",
")",
")",
"\n\n",
"if",
"!",
"value",
".",
"IsValid",
"(",
")",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"}",
"\n\n",
"child",
":=",
"NewXMLElement",
"(",
"xml",
".",
"Name",
"{",
"Local",
":",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
"}",
")",
"\n\n",
"// there is an xmlNamespace associated with this struct",
"if",
"prefix",
",",
"uri",
":=",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
",",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
";",
"uri",
"!=",
"\"",
"\"",
"{",
"ns",
":=",
"xml",
".",
"Attr",
"{",
"Name",
":",
"xml",
".",
"Name",
"{",
"Local",
":",
"\"",
"\"",
"}",
",",
"Value",
":",
"uri",
",",
"}",
"\n",
"if",
"prefix",
"!=",
"\"",
"\"",
"{",
"b",
".",
"namespaces",
"[",
"prefix",
"]",
"=",
"uri",
"// register the namespace",
"\n",
"ns",
".",
"Name",
".",
"Local",
"=",
"\"",
"\"",
"+",
"prefix",
"\n",
"}",
"\n\n",
"child",
".",
"Attr",
"=",
"append",
"(",
"child",
".",
"Attr",
",",
"ns",
")",
"\n",
"}",
"\n\n",
"var",
"payloadFields",
",",
"nonPayloadFields",
"int",
"\n\n",
"t",
":=",
"value",
".",
"Type",
"(",
")",
"\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"value",
".",
"NumField",
"(",
")",
";",
"i",
"++",
"{",
"member",
":=",
"elemOf",
"(",
"value",
".",
"Field",
"(",
"i",
")",
")",
"\n",
"field",
":=",
"t",
".",
"Field",
"(",
"i",
")",
"\n\n",
"if",
"field",
".",
"PkgPath",
"!=",
"\"",
"\"",
"{",
"continue",
"// ignore unexported fields",
"\n",
"}",
"\n",
"if",
"field",
".",
"Tag",
".",
"Get",
"(",
"\"",
"\"",
")",
"!=",
"\"",
"\"",
"{",
"continue",
"\n",
"}",
"\n\n",
"mTag",
":=",
"field",
".",
"Tag",
"\n",
"if",
"mTag",
".",
"Get",
"(",
"\"",
"\"",
")",
"!=",
"\"",
"\"",
"{",
"// skip non-body members",
"nonPayloadFields",
"++",
"\n",
"continue",
"\n",
"}",
"\n",
"payloadFields",
"++",
"\n\n",
"if",
"protocol",
".",
"CanSetIdempotencyToken",
"(",
"value",
".",
"Field",
"(",
"i",
")",
",",
"field",
")",
"{",
"token",
":=",
"protocol",
".",
"GetIdempotencyToken",
"(",
")",
"\n",
"member",
"=",
"reflect",
".",
"ValueOf",
"(",
"token",
")",
"\n",
"}",
"\n\n",
"memberName",
":=",
"mTag",
".",
"Get",
"(",
"\"",
"\"",
")",
"\n",
"if",
"memberName",
"==",
"\"",
"\"",
"{",
"memberName",
"=",
"field",
".",
"Name",
"\n",
"mTag",
"=",
"reflect",
".",
"StructTag",
"(",
"string",
"(",
"mTag",
")",
"+",
"` locationName:\"`",
"+",
"memberName",
"+",
"`\"`",
")",
"\n",
"}",
"\n",
"if",
"err",
":=",
"b",
".",
"buildValue",
"(",
"member",
",",
"child",
",",
"mTag",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"}",
"\n\n",
"// Only case where the child shape is not added is if the shape only contains",
"// non-payload fields, e.g headers/query.",
"if",
"!",
"(",
"payloadFields",
"==",
"0",
"&&",
"nonPayloadFields",
">",
"0",
")",
"{",
"current",
".",
"AddChild",
"(",
"child",
")",
"\n",
"}",
"\n\n",
"return",
"nil",
"\n",
"}"
] | // buildStruct adds a struct and its fields to the current XMLNode. All fields and any nested
// types are converted to XMLNodes also. | [
"buildStruct",
"adds",
"a",
"struct",
"and",
"its",
"fields",
"to",
"the",
"current",
"XMLNode",
".",
"All",
"fields",
"and",
"any",
"nested",
"types",
"are",
"converted",
"to",
"XMLNodes",
"also",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/protocol/xml/xmlutil/build.go#L92-L167 |
572 | aws/aws-sdk-go | private/protocol/xml/xmlutil/build.go | buildList | func (b *xmlBuilder) buildList(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
if value.IsNil() { // don't build omitted lists
return nil
}
// check for unflattened list member
flattened := tag.Get("flattened") != ""
xname := xml.Name{Local: tag.Get("locationName")}
if flattened {
for i := 0; i < value.Len(); i++ {
child := NewXMLElement(xname)
current.AddChild(child)
if err := b.buildValue(value.Index(i), child, ""); err != nil {
return err
}
}
} else {
list := NewXMLElement(xname)
current.AddChild(list)
for i := 0; i < value.Len(); i++ {
iname := tag.Get("locationNameList")
if iname == "" {
iname = "member"
}
child := NewXMLElement(xml.Name{Local: iname})
list.AddChild(child)
if err := b.buildValue(value.Index(i), child, ""); err != nil {
return err
}
}
}
return nil
} | go | func (b *xmlBuilder) buildList(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
if value.IsNil() { // don't build omitted lists
return nil
}
// check for unflattened list member
flattened := tag.Get("flattened") != ""
xname := xml.Name{Local: tag.Get("locationName")}
if flattened {
for i := 0; i < value.Len(); i++ {
child := NewXMLElement(xname)
current.AddChild(child)
if err := b.buildValue(value.Index(i), child, ""); err != nil {
return err
}
}
} else {
list := NewXMLElement(xname)
current.AddChild(list)
for i := 0; i < value.Len(); i++ {
iname := tag.Get("locationNameList")
if iname == "" {
iname = "member"
}
child := NewXMLElement(xml.Name{Local: iname})
list.AddChild(child)
if err := b.buildValue(value.Index(i), child, ""); err != nil {
return err
}
}
}
return nil
} | [
"func",
"(",
"b",
"*",
"xmlBuilder",
")",
"buildList",
"(",
"value",
"reflect",
".",
"Value",
",",
"current",
"*",
"XMLNode",
",",
"tag",
"reflect",
".",
"StructTag",
")",
"error",
"{",
"if",
"value",
".",
"IsNil",
"(",
")",
"{",
"// don't build omitted lists",
"return",
"nil",
"\n",
"}",
"\n\n",
"// check for unflattened list member",
"flattened",
":=",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
"!=",
"\"",
"\"",
"\n\n",
"xname",
":=",
"xml",
".",
"Name",
"{",
"Local",
":",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
"}",
"\n",
"if",
"flattened",
"{",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"value",
".",
"Len",
"(",
")",
";",
"i",
"++",
"{",
"child",
":=",
"NewXMLElement",
"(",
"xname",
")",
"\n",
"current",
".",
"AddChild",
"(",
"child",
")",
"\n",
"if",
"err",
":=",
"b",
".",
"buildValue",
"(",
"value",
".",
"Index",
"(",
"i",
")",
",",
"child",
",",
"\"",
"\"",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"}",
"\n",
"}",
"else",
"{",
"list",
":=",
"NewXMLElement",
"(",
"xname",
")",
"\n",
"current",
".",
"AddChild",
"(",
"list",
")",
"\n\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"value",
".",
"Len",
"(",
")",
";",
"i",
"++",
"{",
"iname",
":=",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
"\n",
"if",
"iname",
"==",
"\"",
"\"",
"{",
"iname",
"=",
"\"",
"\"",
"\n",
"}",
"\n\n",
"child",
":=",
"NewXMLElement",
"(",
"xml",
".",
"Name",
"{",
"Local",
":",
"iname",
"}",
")",
"\n",
"list",
".",
"AddChild",
"(",
"child",
")",
"\n",
"if",
"err",
":=",
"b",
".",
"buildValue",
"(",
"value",
".",
"Index",
"(",
"i",
")",
",",
"child",
",",
"\"",
"\"",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"}",
"\n",
"}",
"\n\n",
"return",
"nil",
"\n",
"}"
] | // buildList adds the value's list items to the current XMLNode as children nodes. All
// nested values in the list are converted to XMLNodes also. | [
"buildList",
"adds",
"the",
"value",
"s",
"list",
"items",
"to",
"the",
"current",
"XMLNode",
"as",
"children",
"nodes",
".",
"All",
"nested",
"values",
"in",
"the",
"list",
"are",
"converted",
"to",
"XMLNodes",
"also",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/protocol/xml/xmlutil/build.go#L171-L207 |
573 | aws/aws-sdk-go | private/protocol/xml/xmlutil/build.go | buildScalar | func (b *xmlBuilder) buildScalar(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
var str string
switch converted := value.Interface().(type) {
case string:
str = converted
case []byte:
if !value.IsNil() {
str = base64.StdEncoding.EncodeToString(converted)
}
case bool:
str = strconv.FormatBool(converted)
case int64:
str = strconv.FormatInt(converted, 10)
case int:
str = strconv.Itoa(converted)
case float64:
str = strconv.FormatFloat(converted, 'f', -1, 64)
case float32:
str = strconv.FormatFloat(float64(converted), 'f', -1, 32)
case time.Time:
format := tag.Get("timestampFormat")
if len(format) == 0 {
format = protocol.ISO8601TimeFormatName
}
str = protocol.FormatTime(format, converted)
default:
return fmt.Errorf("unsupported value for param %s: %v (%s)",
tag.Get("locationName"), value.Interface(), value.Type().Name())
}
xname := xml.Name{Local: tag.Get("locationName")}
if tag.Get("xmlAttribute") != "" { // put into current node's attribute list
attr := xml.Attr{Name: xname, Value: str}
current.Attr = append(current.Attr, attr)
} else { // regular text node
current.AddChild(&XMLNode{Name: xname, Text: str})
}
return nil
} | go | func (b *xmlBuilder) buildScalar(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
var str string
switch converted := value.Interface().(type) {
case string:
str = converted
case []byte:
if !value.IsNil() {
str = base64.StdEncoding.EncodeToString(converted)
}
case bool:
str = strconv.FormatBool(converted)
case int64:
str = strconv.FormatInt(converted, 10)
case int:
str = strconv.Itoa(converted)
case float64:
str = strconv.FormatFloat(converted, 'f', -1, 64)
case float32:
str = strconv.FormatFloat(float64(converted), 'f', -1, 32)
case time.Time:
format := tag.Get("timestampFormat")
if len(format) == 0 {
format = protocol.ISO8601TimeFormatName
}
str = protocol.FormatTime(format, converted)
default:
return fmt.Errorf("unsupported value for param %s: %v (%s)",
tag.Get("locationName"), value.Interface(), value.Type().Name())
}
xname := xml.Name{Local: tag.Get("locationName")}
if tag.Get("xmlAttribute") != "" { // put into current node's attribute list
attr := xml.Attr{Name: xname, Value: str}
current.Attr = append(current.Attr, attr)
} else { // regular text node
current.AddChild(&XMLNode{Name: xname, Text: str})
}
return nil
} | [
"func",
"(",
"b",
"*",
"xmlBuilder",
")",
"buildScalar",
"(",
"value",
"reflect",
".",
"Value",
",",
"current",
"*",
"XMLNode",
",",
"tag",
"reflect",
".",
"StructTag",
")",
"error",
"{",
"var",
"str",
"string",
"\n",
"switch",
"converted",
":=",
"value",
".",
"Interface",
"(",
")",
".",
"(",
"type",
")",
"{",
"case",
"string",
":",
"str",
"=",
"converted",
"\n",
"case",
"[",
"]",
"byte",
":",
"if",
"!",
"value",
".",
"IsNil",
"(",
")",
"{",
"str",
"=",
"base64",
".",
"StdEncoding",
".",
"EncodeToString",
"(",
"converted",
")",
"\n",
"}",
"\n",
"case",
"bool",
":",
"str",
"=",
"strconv",
".",
"FormatBool",
"(",
"converted",
")",
"\n",
"case",
"int64",
":",
"str",
"=",
"strconv",
".",
"FormatInt",
"(",
"converted",
",",
"10",
")",
"\n",
"case",
"int",
":",
"str",
"=",
"strconv",
".",
"Itoa",
"(",
"converted",
")",
"\n",
"case",
"float64",
":",
"str",
"=",
"strconv",
".",
"FormatFloat",
"(",
"converted",
",",
"'f'",
",",
"-",
"1",
",",
"64",
")",
"\n",
"case",
"float32",
":",
"str",
"=",
"strconv",
".",
"FormatFloat",
"(",
"float64",
"(",
"converted",
")",
",",
"'f'",
",",
"-",
"1",
",",
"32",
")",
"\n",
"case",
"time",
".",
"Time",
":",
"format",
":=",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
"\n",
"if",
"len",
"(",
"format",
")",
"==",
"0",
"{",
"format",
"=",
"protocol",
".",
"ISO8601TimeFormatName",
"\n",
"}",
"\n\n",
"str",
"=",
"protocol",
".",
"FormatTime",
"(",
"format",
",",
"converted",
")",
"\n",
"default",
":",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
",",
"value",
".",
"Interface",
"(",
")",
",",
"value",
".",
"Type",
"(",
")",
".",
"Name",
"(",
")",
")",
"\n",
"}",
"\n\n",
"xname",
":=",
"xml",
".",
"Name",
"{",
"Local",
":",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
"}",
"\n",
"if",
"tag",
".",
"Get",
"(",
"\"",
"\"",
")",
"!=",
"\"",
"\"",
"{",
"// put into current node's attribute list",
"attr",
":=",
"xml",
".",
"Attr",
"{",
"Name",
":",
"xname",
",",
"Value",
":",
"str",
"}",
"\n",
"current",
".",
"Attr",
"=",
"append",
"(",
"current",
".",
"Attr",
",",
"attr",
")",
"\n",
"}",
"else",
"{",
"// regular text node",
"current",
".",
"AddChild",
"(",
"&",
"XMLNode",
"{",
"Name",
":",
"xname",
",",
"Text",
":",
"str",
"}",
")",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}"
] | // buildScalar will convert the value into a string and append it as a attribute or child
// of the current XMLNode.
//
// The value will be added as an attribute if tag contains a "xmlAttribute" attribute value.
//
// Error will be returned if the value type is unsupported. | [
"buildScalar",
"will",
"convert",
"the",
"value",
"into",
"a",
"string",
"and",
"append",
"it",
"as",
"a",
"attribute",
"or",
"child",
"of",
"the",
"current",
"XMLNode",
".",
"The",
"value",
"will",
"be",
"added",
"as",
"an",
"attribute",
"if",
"tag",
"contains",
"a",
"xmlAttribute",
"attribute",
"value",
".",
"Error",
"will",
"be",
"returned",
"if",
"the",
"value",
"type",
"is",
"unsupported",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/protocol/xml/xmlutil/build.go#L267-L306 |
574 | aws/aws-sdk-go | service/ses/waiters.go | WaitUntilIdentityExists | func (c *SES) WaitUntilIdentityExists(input *GetIdentityVerificationAttributesInput) error {
return c.WaitUntilIdentityExistsWithContext(aws.BackgroundContext(), input)
} | go | func (c *SES) WaitUntilIdentityExists(input *GetIdentityVerificationAttributesInput) error {
return c.WaitUntilIdentityExistsWithContext(aws.BackgroundContext(), input)
} | [
"func",
"(",
"c",
"*",
"SES",
")",
"WaitUntilIdentityExists",
"(",
"input",
"*",
"GetIdentityVerificationAttributesInput",
")",
"error",
"{",
"return",
"c",
".",
"WaitUntilIdentityExistsWithContext",
"(",
"aws",
".",
"BackgroundContext",
"(",
")",
",",
"input",
")",
"\n",
"}"
] | // WaitUntilIdentityExists uses the Amazon SES API operation
// GetIdentityVerificationAttributes to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
// be returned. | [
"WaitUntilIdentityExists",
"uses",
"the",
"Amazon",
"SES",
"API",
"operation",
"GetIdentityVerificationAttributes",
"to",
"wait",
"for",
"a",
"condition",
"to",
"be",
"met",
"before",
"returning",
".",
"If",
"the",
"condition",
"is",
"not",
"met",
"within",
"the",
"max",
"attempt",
"window",
"an",
"error",
"will",
"be",
"returned",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/ses/waiters.go#L16-L18 |
575 | aws/aws-sdk-go | service/cloudfront/waiters.go | WaitUntilDistributionDeployed | func (c *CloudFront) WaitUntilDistributionDeployed(input *GetDistributionInput) error {
return c.WaitUntilDistributionDeployedWithContext(aws.BackgroundContext(), input)
} | go | func (c *CloudFront) WaitUntilDistributionDeployed(input *GetDistributionInput) error {
return c.WaitUntilDistributionDeployedWithContext(aws.BackgroundContext(), input)
} | [
"func",
"(",
"c",
"*",
"CloudFront",
")",
"WaitUntilDistributionDeployed",
"(",
"input",
"*",
"GetDistributionInput",
")",
"error",
"{",
"return",
"c",
".",
"WaitUntilDistributionDeployedWithContext",
"(",
"aws",
".",
"BackgroundContext",
"(",
")",
",",
"input",
")",
"\n",
"}"
] | // WaitUntilDistributionDeployed uses the CloudFront API operation
// GetDistribution to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
// be returned. | [
"WaitUntilDistributionDeployed",
"uses",
"the",
"CloudFront",
"API",
"operation",
"GetDistribution",
"to",
"wait",
"for",
"a",
"condition",
"to",
"be",
"met",
"before",
"returning",
".",
"If",
"the",
"condition",
"is",
"not",
"met",
"within",
"the",
"max",
"attempt",
"window",
"an",
"error",
"will",
"be",
"returned",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/cloudfront/waiters.go#L16-L18 |
576 | aws/aws-sdk-go | service/cloudfront/waiters.go | WaitUntilInvalidationCompleted | func (c *CloudFront) WaitUntilInvalidationCompleted(input *GetInvalidationInput) error {
return c.WaitUntilInvalidationCompletedWithContext(aws.BackgroundContext(), input)
} | go | func (c *CloudFront) WaitUntilInvalidationCompleted(input *GetInvalidationInput) error {
return c.WaitUntilInvalidationCompletedWithContext(aws.BackgroundContext(), input)
} | [
"func",
"(",
"c",
"*",
"CloudFront",
")",
"WaitUntilInvalidationCompleted",
"(",
"input",
"*",
"GetInvalidationInput",
")",
"error",
"{",
"return",
"c",
".",
"WaitUntilInvalidationCompletedWithContext",
"(",
"aws",
".",
"BackgroundContext",
"(",
")",
",",
"input",
")",
"\n",
"}"
] | // WaitUntilInvalidationCompleted uses the CloudFront API operation
// GetInvalidation to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
// be returned. | [
"WaitUntilInvalidationCompleted",
"uses",
"the",
"CloudFront",
"API",
"operation",
"GetInvalidation",
"to",
"wait",
"for",
"a",
"condition",
"to",
"be",
"met",
"before",
"returning",
".",
"If",
"the",
"condition",
"is",
"not",
"met",
"within",
"the",
"max",
"attempt",
"window",
"an",
"error",
"will",
"be",
"returned",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/cloudfront/waiters.go#L62-L64 |
577 | aws/aws-sdk-go | service/cloudfront/waiters.go | WaitUntilStreamingDistributionDeployed | func (c *CloudFront) WaitUntilStreamingDistributionDeployed(input *GetStreamingDistributionInput) error {
return c.WaitUntilStreamingDistributionDeployedWithContext(aws.BackgroundContext(), input)
} | go | func (c *CloudFront) WaitUntilStreamingDistributionDeployed(input *GetStreamingDistributionInput) error {
return c.WaitUntilStreamingDistributionDeployedWithContext(aws.BackgroundContext(), input)
} | [
"func",
"(",
"c",
"*",
"CloudFront",
")",
"WaitUntilStreamingDistributionDeployed",
"(",
"input",
"*",
"GetStreamingDistributionInput",
")",
"error",
"{",
"return",
"c",
".",
"WaitUntilStreamingDistributionDeployedWithContext",
"(",
"aws",
".",
"BackgroundContext",
"(",
")",
",",
"input",
")",
"\n",
"}"
] | // WaitUntilStreamingDistributionDeployed uses the CloudFront API operation
// GetStreamingDistribution to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
// be returned. | [
"WaitUntilStreamingDistributionDeployed",
"uses",
"the",
"CloudFront",
"API",
"operation",
"GetStreamingDistribution",
"to",
"wait",
"for",
"a",
"condition",
"to",
"be",
"met",
"before",
"returning",
".",
"If",
"the",
"condition",
"is",
"not",
"met",
"within",
"the",
"max",
"attempt",
"window",
"an",
"error",
"will",
"be",
"returned",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/cloudfront/waiters.go#L108-L110 |
578 | aws/aws-sdk-go | service/opsworks/waiters.go | WaitUntilAppExists | func (c *OpsWorks) WaitUntilAppExists(input *DescribeAppsInput) error {
return c.WaitUntilAppExistsWithContext(aws.BackgroundContext(), input)
} | go | func (c *OpsWorks) WaitUntilAppExists(input *DescribeAppsInput) error {
return c.WaitUntilAppExistsWithContext(aws.BackgroundContext(), input)
} | [
"func",
"(",
"c",
"*",
"OpsWorks",
")",
"WaitUntilAppExists",
"(",
"input",
"*",
"DescribeAppsInput",
")",
"error",
"{",
"return",
"c",
".",
"WaitUntilAppExistsWithContext",
"(",
"aws",
".",
"BackgroundContext",
"(",
")",
",",
"input",
")",
"\n",
"}"
] | // WaitUntilAppExists uses the AWS OpsWorks API operation
// DescribeApps to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
// be returned. | [
"WaitUntilAppExists",
"uses",
"the",
"AWS",
"OpsWorks",
"API",
"operation",
"DescribeApps",
"to",
"wait",
"for",
"a",
"condition",
"to",
"be",
"met",
"before",
"returning",
".",
"If",
"the",
"condition",
"is",
"not",
"met",
"within",
"the",
"max",
"attempt",
"window",
"an",
"error",
"will",
"be",
"returned",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/waiters.go#L16-L18 |
579 | aws/aws-sdk-go | service/opsworks/waiters.go | WaitUntilDeploymentSuccessful | func (c *OpsWorks) WaitUntilDeploymentSuccessful(input *DescribeDeploymentsInput) error {
return c.WaitUntilDeploymentSuccessfulWithContext(aws.BackgroundContext(), input)
} | go | func (c *OpsWorks) WaitUntilDeploymentSuccessful(input *DescribeDeploymentsInput) error {
return c.WaitUntilDeploymentSuccessfulWithContext(aws.BackgroundContext(), input)
} | [
"func",
"(",
"c",
"*",
"OpsWorks",
")",
"WaitUntilDeploymentSuccessful",
"(",
"input",
"*",
"DescribeDeploymentsInput",
")",
"error",
"{",
"return",
"c",
".",
"WaitUntilDeploymentSuccessfulWithContext",
"(",
"aws",
".",
"BackgroundContext",
"(",
")",
",",
"input",
")",
"\n",
"}"
] | // WaitUntilDeploymentSuccessful uses the AWS OpsWorks API operation
// DescribeDeployments to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
// be returned. | [
"WaitUntilDeploymentSuccessful",
"uses",
"the",
"AWS",
"OpsWorks",
"API",
"operation",
"DescribeDeployments",
"to",
"wait",
"for",
"a",
"condition",
"to",
"be",
"met",
"before",
"returning",
".",
"If",
"the",
"condition",
"is",
"not",
"met",
"within",
"the",
"max",
"attempt",
"window",
"an",
"error",
"will",
"be",
"returned",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/waiters.go#L67-L69 |
580 | aws/aws-sdk-go | service/opsworks/waiters.go | WaitUntilInstanceOnline | func (c *OpsWorks) WaitUntilInstanceOnline(input *DescribeInstancesInput) error {
return c.WaitUntilInstanceOnlineWithContext(aws.BackgroundContext(), input)
} | go | func (c *OpsWorks) WaitUntilInstanceOnline(input *DescribeInstancesInput) error {
return c.WaitUntilInstanceOnlineWithContext(aws.BackgroundContext(), input)
} | [
"func",
"(",
"c",
"*",
"OpsWorks",
")",
"WaitUntilInstanceOnline",
"(",
"input",
"*",
"DescribeInstancesInput",
")",
"error",
"{",
"return",
"c",
".",
"WaitUntilInstanceOnlineWithContext",
"(",
"aws",
".",
"BackgroundContext",
"(",
")",
",",
"input",
")",
"\n",
"}"
] | // WaitUntilInstanceOnline uses the AWS OpsWorks API operation
// DescribeInstances to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
// be returned. | [
"WaitUntilInstanceOnline",
"uses",
"the",
"AWS",
"OpsWorks",
"API",
"operation",
"DescribeInstances",
"to",
"wait",
"for",
"a",
"condition",
"to",
"be",
"met",
"before",
"returning",
".",
"If",
"the",
"condition",
"is",
"not",
"met",
"within",
"the",
"max",
"attempt",
"window",
"an",
"error",
"will",
"be",
"returned",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/waiters.go#L118-L120 |
581 | aws/aws-sdk-go | service/opsworks/waiters.go | WaitUntilInstanceRegistered | func (c *OpsWorks) WaitUntilInstanceRegistered(input *DescribeInstancesInput) error {
return c.WaitUntilInstanceRegisteredWithContext(aws.BackgroundContext(), input)
} | go | func (c *OpsWorks) WaitUntilInstanceRegistered(input *DescribeInstancesInput) error {
return c.WaitUntilInstanceRegisteredWithContext(aws.BackgroundContext(), input)
} | [
"func",
"(",
"c",
"*",
"OpsWorks",
")",
"WaitUntilInstanceRegistered",
"(",
"input",
"*",
"DescribeInstancesInput",
")",
"error",
"{",
"return",
"c",
".",
"WaitUntilInstanceRegisteredWithContext",
"(",
"aws",
".",
"BackgroundContext",
"(",
")",
",",
"input",
")",
"\n",
"}"
] | // WaitUntilInstanceRegistered uses the AWS OpsWorks API operation
// DescribeInstances to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
// be returned. | [
"WaitUntilInstanceRegistered",
"uses",
"the",
"AWS",
"OpsWorks",
"API",
"operation",
"DescribeInstances",
"to",
"wait",
"for",
"a",
"condition",
"to",
"be",
"met",
"before",
"returning",
".",
"If",
"the",
"condition",
"is",
"not",
"met",
"within",
"the",
"max",
"attempt",
"window",
"an",
"error",
"will",
"be",
"returned",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/waiters.go#L204-L206 |
582 | aws/aws-sdk-go | service/opsworks/waiters.go | WaitUntilInstanceTerminated | func (c *OpsWorks) WaitUntilInstanceTerminated(input *DescribeInstancesInput) error {
return c.WaitUntilInstanceTerminatedWithContext(aws.BackgroundContext(), input)
} | go | func (c *OpsWorks) WaitUntilInstanceTerminated(input *DescribeInstancesInput) error {
return c.WaitUntilInstanceTerminatedWithContext(aws.BackgroundContext(), input)
} | [
"func",
"(",
"c",
"*",
"OpsWorks",
")",
"WaitUntilInstanceTerminated",
"(",
"input",
"*",
"DescribeInstancesInput",
")",
"error",
"{",
"return",
"c",
".",
"WaitUntilInstanceTerminatedWithContext",
"(",
"aws",
".",
"BackgroundContext",
"(",
")",
",",
"input",
")",
"\n",
"}"
] | // WaitUntilInstanceTerminated uses the AWS OpsWorks API operation
// DescribeInstances to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
// be returned. | [
"WaitUntilInstanceTerminated",
"uses",
"the",
"AWS",
"OpsWorks",
"API",
"operation",
"DescribeInstances",
"to",
"wait",
"for",
"a",
"condition",
"to",
"be",
"met",
"before",
"returning",
".",
"If",
"the",
"condition",
"is",
"not",
"met",
"within",
"the",
"max",
"attempt",
"window",
"an",
"error",
"will",
"be",
"returned",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/waiters.go#L371-L373 |
583 | aws/aws-sdk-go | service/directoryservice/api.go | SetSharedDirectory | func (s *AcceptSharedDirectoryOutput) SetSharedDirectory(v *SharedDirectory) *AcceptSharedDirectoryOutput {
s.SharedDirectory = v
return s
} | go | func (s *AcceptSharedDirectoryOutput) SetSharedDirectory(v *SharedDirectory) *AcceptSharedDirectoryOutput {
s.SharedDirectory = v
return s
} | [
"func",
"(",
"s",
"*",
"AcceptSharedDirectoryOutput",
")",
"SetSharedDirectory",
"(",
"v",
"*",
"SharedDirectory",
")",
"*",
"AcceptSharedDirectoryOutput",
"{",
"s",
".",
"SharedDirectory",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetSharedDirectory sets the SharedDirectory field's value. | [
"SetSharedDirectory",
"sets",
"the",
"SharedDirectory",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/directoryservice/api.go#L4849-L4852 |
584 | aws/aws-sdk-go | service/directoryservice/api.go | SetIpRoutes | func (s *AddIpRoutesInput) SetIpRoutes(v []*IpRoute) *AddIpRoutesInput {
s.IpRoutes = v
return s
} | go | func (s *AddIpRoutesInput) SetIpRoutes(v []*IpRoute) *AddIpRoutesInput {
s.IpRoutes = v
return s
} | [
"func",
"(",
"s",
"*",
"AddIpRoutesInput",
")",
"SetIpRoutes",
"(",
"v",
"[",
"]",
"*",
"IpRoute",
")",
"*",
"AddIpRoutesInput",
"{",
"s",
".",
"IpRoutes",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetIpRoutes sets the IpRoutes field's value. | [
"SetIpRoutes",
"sets",
"the",
"IpRoutes",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/directoryservice/api.go#L4947-L4950 |
585 | aws/aws-sdk-go | service/directoryservice/api.go | SetUpdateSecurityGroupForDirectoryControllers | func (s *AddIpRoutesInput) SetUpdateSecurityGroupForDirectoryControllers(v bool) *AddIpRoutesInput {
s.UpdateSecurityGroupForDirectoryControllers = &v
return s
} | go | func (s *AddIpRoutesInput) SetUpdateSecurityGroupForDirectoryControllers(v bool) *AddIpRoutesInput {
s.UpdateSecurityGroupForDirectoryControllers = &v
return s
} | [
"func",
"(",
"s",
"*",
"AddIpRoutesInput",
")",
"SetUpdateSecurityGroupForDirectoryControllers",
"(",
"v",
"bool",
")",
"*",
"AddIpRoutesInput",
"{",
"s",
".",
"UpdateSecurityGroupForDirectoryControllers",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetUpdateSecurityGroupForDirectoryControllers sets the UpdateSecurityGroupForDirectoryControllers field's value. | [
"SetUpdateSecurityGroupForDirectoryControllers",
"sets",
"the",
"UpdateSecurityGroupForDirectoryControllers",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/directoryservice/api.go#L4953-L4956 |
586 | aws/aws-sdk-go | service/directoryservice/api.go | SetComputerId | func (s *Computer) SetComputerId(v string) *Computer {
s.ComputerId = &v
return s
} | go | func (s *Computer) SetComputerId(v string) *Computer {
s.ComputerId = &v
return s
} | [
"func",
"(",
"s",
"*",
"Computer",
")",
"SetComputerId",
"(",
"v",
"string",
")",
"*",
"Computer",
"{",
"s",
".",
"ComputerId",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetComputerId sets the ComputerId field's value. | [
"SetComputerId",
"sets",
"the",
"ComputerId",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/directoryservice/api.go#L5192-L5195 |
587 | aws/aws-sdk-go | service/directoryservice/api.go | SetReplicationScope | func (s *ConditionalForwarder) SetReplicationScope(v string) *ConditionalForwarder {
s.ReplicationScope = &v
return s
} | go | func (s *ConditionalForwarder) SetReplicationScope(v string) *ConditionalForwarder {
s.ReplicationScope = &v
return s
} | [
"func",
"(",
"s",
"*",
"ConditionalForwarder",
")",
"SetReplicationScope",
"(",
"v",
"string",
")",
"*",
"ConditionalForwarder",
"{",
"s",
".",
"ReplicationScope",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetReplicationScope sets the ReplicationScope field's value. | [
"SetReplicationScope",
"sets",
"the",
"ReplicationScope",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/directoryservice/api.go#L5247-L5250 |
588 | aws/aws-sdk-go | service/directoryservice/api.go | SetComputer | func (s *CreateComputerOutput) SetComputer(v *Computer) *CreateComputerOutput {
s.Computer = v
return s
} | go | func (s *CreateComputerOutput) SetComputer(v *Computer) *CreateComputerOutput {
s.Computer = v
return s
} | [
"func",
"(",
"s",
"*",
"CreateComputerOutput",
")",
"SetComputer",
"(",
"v",
"*",
"Computer",
")",
"*",
"CreateComputerOutput",
"{",
"s",
".",
"Computer",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetComputer sets the Computer field's value. | [
"SetComputer",
"sets",
"the",
"Computer",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/directoryservice/api.go#L5621-L5624 |
589 | aws/aws-sdk-go | service/directoryservice/api.go | SetConditionalForwarderIpAddrs | func (s *CreateTrustInput) SetConditionalForwarderIpAddrs(v []*string) *CreateTrustInput {
s.ConditionalForwarderIpAddrs = v
return s
} | go | func (s *CreateTrustInput) SetConditionalForwarderIpAddrs(v []*string) *CreateTrustInput {
s.ConditionalForwarderIpAddrs = v
return s
} | [
"func",
"(",
"s",
"*",
"CreateTrustInput",
")",
"SetConditionalForwarderIpAddrs",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"CreateTrustInput",
"{",
"s",
".",
"ConditionalForwarderIpAddrs",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetConditionalForwarderIpAddrs sets the ConditionalForwarderIpAddrs field's value. | [
"SetConditionalForwarderIpAddrs",
"sets",
"the",
"ConditionalForwarderIpAddrs",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/directoryservice/api.go#L6228-L6231 |
590 | aws/aws-sdk-go | service/directoryservice/api.go | SetTrustPassword | func (s *CreateTrustInput) SetTrustPassword(v string) *CreateTrustInput {
s.TrustPassword = &v
return s
} | go | func (s *CreateTrustInput) SetTrustPassword(v string) *CreateTrustInput {
s.TrustPassword = &v
return s
} | [
"func",
"(",
"s",
"*",
"CreateTrustInput",
")",
"SetTrustPassword",
"(",
"v",
"string",
")",
"*",
"CreateTrustInput",
"{",
"s",
".",
"TrustPassword",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetTrustPassword sets the TrustPassword field's value. | [
"SetTrustPassword",
"sets",
"the",
"TrustPassword",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/directoryservice/api.go#L6258-L6261 |
591 | aws/aws-sdk-go | service/directoryservice/api.go | SetDeleteAssociatedConditionalForwarder | func (s *DeleteTrustInput) SetDeleteAssociatedConditionalForwarder(v bool) *DeleteTrustInput {
s.DeleteAssociatedConditionalForwarder = &v
return s
} | go | func (s *DeleteTrustInput) SetDeleteAssociatedConditionalForwarder(v bool) *DeleteTrustInput {
s.DeleteAssociatedConditionalForwarder = &v
return s
} | [
"func",
"(",
"s",
"*",
"DeleteTrustInput",
")",
"SetDeleteAssociatedConditionalForwarder",
"(",
"v",
"bool",
")",
"*",
"DeleteTrustInput",
"{",
"s",
".",
"DeleteAssociatedConditionalForwarder",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetDeleteAssociatedConditionalForwarder sets the DeleteAssociatedConditionalForwarder field's value. | [
"SetDeleteAssociatedConditionalForwarder",
"sets",
"the",
"DeleteAssociatedConditionalForwarder",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/directoryservice/api.go#L6578-L6581 |
592 | aws/aws-sdk-go | service/directoryservice/api.go | SetRemoteDomainNames | func (s *DescribeConditionalForwardersInput) SetRemoteDomainNames(v []*string) *DescribeConditionalForwardersInput {
s.RemoteDomainNames = v
return s
} | go | func (s *DescribeConditionalForwardersInput) SetRemoteDomainNames(v []*string) *DescribeConditionalForwardersInput {
s.RemoteDomainNames = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeConditionalForwardersInput",
")",
"SetRemoteDomainNames",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"DescribeConditionalForwardersInput",
"{",
"s",
".",
"RemoteDomainNames",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetRemoteDomainNames sets the RemoteDomainNames field's value. | [
"SetRemoteDomainNames",
"sets",
"the",
"RemoteDomainNames",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/directoryservice/api.go#L6730-L6733 |
593 | aws/aws-sdk-go | service/directoryservice/api.go | SetConditionalForwarders | func (s *DescribeConditionalForwardersOutput) SetConditionalForwarders(v []*ConditionalForwarder) *DescribeConditionalForwardersOutput {
s.ConditionalForwarders = v
return s
} | go | func (s *DescribeConditionalForwardersOutput) SetConditionalForwarders(v []*ConditionalForwarder) *DescribeConditionalForwardersOutput {
s.ConditionalForwarders = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeConditionalForwardersOutput",
")",
"SetConditionalForwarders",
"(",
"v",
"[",
"]",
"*",
"ConditionalForwarder",
")",
"*",
"DescribeConditionalForwardersOutput",
"{",
"s",
".",
"ConditionalForwarders",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetConditionalForwarders sets the ConditionalForwarders field's value. | [
"SetConditionalForwarders",
"sets",
"the",
"ConditionalForwarders",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/directoryservice/api.go#L6754-L6757 |
594 | aws/aws-sdk-go | service/directoryservice/api.go | SetDirectoryDescriptions | func (s *DescribeDirectoriesOutput) SetDirectoryDescriptions(v []*DirectoryDescription) *DescribeDirectoriesOutput {
s.DirectoryDescriptions = v
return s
} | go | func (s *DescribeDirectoriesOutput) SetDirectoryDescriptions(v []*DirectoryDescription) *DescribeDirectoriesOutput {
s.DirectoryDescriptions = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeDirectoriesOutput",
")",
"SetDirectoryDescriptions",
"(",
"v",
"[",
"]",
"*",
"DirectoryDescription",
")",
"*",
"DescribeDirectoriesOutput",
"{",
"s",
".",
"DirectoryDescriptions",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetDirectoryDescriptions sets the DirectoryDescriptions field's value. | [
"SetDirectoryDescriptions",
"sets",
"the",
"DirectoryDescriptions",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/directoryservice/api.go#L6836-L6839 |
595 | aws/aws-sdk-go | service/directoryservice/api.go | SetDomainControllerIds | func (s *DescribeDomainControllersInput) SetDomainControllerIds(v []*string) *DescribeDomainControllersInput {
s.DomainControllerIds = v
return s
} | go | func (s *DescribeDomainControllersInput) SetDomainControllerIds(v []*string) *DescribeDomainControllersInput {
s.DomainControllerIds = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeDomainControllersInput",
")",
"SetDomainControllerIds",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"DescribeDomainControllersInput",
"{",
"s",
".",
"DomainControllerIds",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetDomainControllerIds sets the DomainControllerIds field's value. | [
"SetDomainControllerIds",
"sets",
"the",
"DomainControllerIds",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/directoryservice/api.go#L6897-L6900 |
596 | aws/aws-sdk-go | service/directoryservice/api.go | SetTopicNames | func (s *DescribeEventTopicsInput) SetTopicNames(v []*string) *DescribeEventTopicsInput {
s.TopicNames = v
return s
} | go | func (s *DescribeEventTopicsInput) SetTopicNames(v []*string) *DescribeEventTopicsInput {
s.TopicNames = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeEventTopicsInput",
")",
"SetTopicNames",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"DescribeEventTopicsInput",
"{",
"s",
".",
"TopicNames",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetTopicNames sets the TopicNames field's value. | [
"SetTopicNames",
"sets",
"the",
"TopicNames",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/directoryservice/api.go#L6980-L6983 |
597 | aws/aws-sdk-go | service/directoryservice/api.go | SetEventTopics | func (s *DescribeEventTopicsOutput) SetEventTopics(v []*EventTopic) *DescribeEventTopicsOutput {
s.EventTopics = v
return s
} | go | func (s *DescribeEventTopicsOutput) SetEventTopics(v []*EventTopic) *DescribeEventTopicsOutput {
s.EventTopics = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeEventTopicsOutput",
")",
"SetEventTopics",
"(",
"v",
"[",
"]",
"*",
"EventTopic",
")",
"*",
"DescribeEventTopicsOutput",
"{",
"s",
".",
"EventTopics",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetEventTopics sets the EventTopics field's value. | [
"SetEventTopics",
"sets",
"the",
"EventTopics",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/directoryservice/api.go#L7005-L7008 |
598 | aws/aws-sdk-go | service/directoryservice/api.go | SetSharedDirectoryIds | func (s *DescribeSharedDirectoriesInput) SetSharedDirectoryIds(v []*string) *DescribeSharedDirectoriesInput {
s.SharedDirectoryIds = v
return s
} | go | func (s *DescribeSharedDirectoriesInput) SetSharedDirectoryIds(v []*string) *DescribeSharedDirectoriesInput {
s.SharedDirectoryIds = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeSharedDirectoriesInput",
")",
"SetSharedDirectoryIds",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"DescribeSharedDirectoriesInput",
"{",
"s",
".",
"SharedDirectoryIds",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetSharedDirectoryIds sets the SharedDirectoryIds field's value. | [
"SetSharedDirectoryIds",
"sets",
"the",
"SharedDirectoryIds",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/directoryservice/api.go#L7071-L7074 |
599 | aws/aws-sdk-go | service/directoryservice/api.go | SetSharedDirectories | func (s *DescribeSharedDirectoriesOutput) SetSharedDirectories(v []*SharedDirectory) *DescribeSharedDirectoriesOutput {
s.SharedDirectories = v
return s
} | go | func (s *DescribeSharedDirectoriesOutput) SetSharedDirectories(v []*SharedDirectory) *DescribeSharedDirectoriesOutput {
s.SharedDirectories = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeSharedDirectoriesOutput",
")",
"SetSharedDirectories",
"(",
"v",
"[",
"]",
"*",
"SharedDirectory",
")",
"*",
"DescribeSharedDirectoriesOutput",
"{",
"s",
".",
"SharedDirectories",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetSharedDirectories sets the SharedDirectories field's value. | [
"SetSharedDirectories",
"sets",
"the",
"SharedDirectories",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/directoryservice/api.go#L7105-L7108 |