Datasets:
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
|
---|---|---|---|---|---|---|---|---|---|---|---|
0 | aws/aws-sdk-go | internal/ini/value_util.go | getStringValue | func getStringValue(b []rune) (int, error) {
if b[0] != '"' {
return 0, NewParseError("strings must start with '\"'")
}
endQuote := false
i := 1
for ; i < len(b) && !endQuote; i++ {
if escaped := isEscaped(b[:i], b[i]); b[i] == '"' && !escaped {
endQuote = true
break
} else if escaped {
/*c, err := getEscapedByte(b[i])
if err != nil {
return 0, err
}
b[i-1] = c
b = append(b[:i], b[i+1:]...)
i--*/
continue
}
}
if !endQuote {
return 0, NewParseError("missing '\"' in string value")
}
return i + 1, nil
} | go | func getStringValue(b []rune) (int, error) {
if b[0] != '"' {
return 0, NewParseError("strings must start with '\"'")
}
endQuote := false
i := 1
for ; i < len(b) && !endQuote; i++ {
if escaped := isEscaped(b[:i], b[i]); b[i] == '"' && !escaped {
endQuote = true
break
} else if escaped {
/*c, err := getEscapedByte(b[i])
if err != nil {
return 0, err
}
b[i-1] = c
b = append(b[:i], b[i+1:]...)
i--*/
continue
}
}
if !endQuote {
return 0, NewParseError("missing '\"' in string value")
}
return i + 1, nil
} | [
"func",
"getStringValue",
"(",
"b",
"[",
"]",
"rune",
")",
"(",
"int",
",",
"error",
")",
"{",
"if",
"b",
"[",
"0",
"]",
"!=",
"'\"'",
"{",
"return",
"0",
",",
"NewParseError",
"(",
"\"",
"\\\"",
"\"",
")",
"\n",
"}",
"\n\n",
"endQuote",
":=",
"false",
"\n",
"i",
":=",
"1",
"\n\n",
"for",
";",
"i",
"<",
"len",
"(",
"b",
")",
"&&",
"!",
"endQuote",
";",
"i",
"++",
"{",
"if",
"escaped",
":=",
"isEscaped",
"(",
"b",
"[",
":",
"i",
"]",
",",
"b",
"[",
"i",
"]",
")",
";",
"b",
"[",
"i",
"]",
"==",
"'\"'",
"&&",
"!",
"escaped",
"{",
"endQuote",
"=",
"true",
"\n",
"break",
"\n",
"}",
"else",
"if",
"escaped",
"{",
"/*c, err := getEscapedByte(b[i])\n\t\t\tif err != nil {\n\t\t\t\treturn 0, err\n\t\t\t}\n\n\t\t\tb[i-1] = c\n\t\t\tb = append(b[:i], b[i+1:]...)\n\t\t\ti--*/",
"continue",
"\n",
"}",
"\n",
"}",
"\n\n",
"if",
"!",
"endQuote",
"{",
"return",
"0",
",",
"NewParseError",
"(",
"\"",
"\\\"",
"\"",
")",
"\n",
"}",
"\n\n",
"return",
"i",
"+",
"1",
",",
"nil",
"\n",
"}"
] | // getStringValue will return a quoted string and the amount
// of bytes read
//
// an error will be returned if the string is not properly formatted | [
"getStringValue",
"will",
"return",
"a",
"quoted",
"string",
"and",
"the",
"amount",
"of",
"bytes",
"read",
"an",
"error",
"will",
"be",
"returned",
"if",
"the",
"string",
"is",
"not",
"properly",
"formatted"
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/internal/ini/value_util.go#L11-L42 |
1 | aws/aws-sdk-go | internal/ini/value_util.go | getBoolValue | func getBoolValue(b []rune) (int, error) {
if len(b) < 4 {
return 0, NewParseError("invalid boolean value")
}
n := 0
for _, lv := range literalValues {
if len(lv) > len(b) {
continue
}
if isLitValue(lv, b) {
n = len(lv)
}
}
if n == 0 {
return 0, NewParseError("invalid boolean value")
}
return n, nil
} | go | func getBoolValue(b []rune) (int, error) {
if len(b) < 4 {
return 0, NewParseError("invalid boolean value")
}
n := 0
for _, lv := range literalValues {
if len(lv) > len(b) {
continue
}
if isLitValue(lv, b) {
n = len(lv)
}
}
if n == 0 {
return 0, NewParseError("invalid boolean value")
}
return n, nil
} | [
"func",
"getBoolValue",
"(",
"b",
"[",
"]",
"rune",
")",
"(",
"int",
",",
"error",
")",
"{",
"if",
"len",
"(",
"b",
")",
"<",
"4",
"{",
"return",
"0",
",",
"NewParseError",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"n",
":=",
"0",
"\n",
"for",
"_",
",",
"lv",
":=",
"range",
"literalValues",
"{",
"if",
"len",
"(",
"lv",
")",
">",
"len",
"(",
"b",
")",
"{",
"continue",
"\n",
"}",
"\n\n",
"if",
"isLitValue",
"(",
"lv",
",",
"b",
")",
"{",
"n",
"=",
"len",
"(",
"lv",
")",
"\n",
"}",
"\n",
"}",
"\n\n",
"if",
"n",
"==",
"0",
"{",
"return",
"0",
",",
"NewParseError",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"return",
"n",
",",
"nil",
"\n",
"}"
] | // getBoolValue will return a boolean and the amount
// of bytes read
//
// an error will be returned if the boolean is not of a correct
// value | [
"getBoolValue",
"will",
"return",
"a",
"boolean",
"and",
"the",
"amount",
"of",
"bytes",
"read",
"an",
"error",
"will",
"be",
"returned",
"if",
"the",
"boolean",
"is",
"not",
"of",
"a",
"correct",
"value"
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/internal/ini/value_util.go#L49-L70 |
2 | aws/aws-sdk-go | internal/ini/value_util.go | getNumericalValue | func getNumericalValue(b []rune) (int, int, error) {
if !isDigit(b[0]) {
return 0, 0, NewParseError("invalid digit value")
}
i := 0
helper := numberHelper{}
loop:
for negativeIndex := 0; i < len(b); i++ {
negativeIndex++
if !isDigit(b[i]) {
switch b[i] {
case '-':
if helper.IsNegative() || negativeIndex != 1 {
return 0, 0, NewParseError("parse error '-'")
}
n := getNegativeNumber(b[i:])
i += (n - 1)
helper.Determine(b[i])
continue
case '.':
if err := helper.Determine(b[i]); err != nil {
return 0, 0, err
}
case 'e', 'E':
if err := helper.Determine(b[i]); err != nil {
return 0, 0, err
}
negativeIndex = 0
case 'b':
if helper.numberFormat == hex {
break
}
fallthrough
case 'o', 'x':
if i == 0 && b[i] != '0' {
return 0, 0, NewParseError("incorrect base format, expected leading '0'")
}
if i != 1 {
return 0, 0, NewParseError(fmt.Sprintf("incorrect base format found %s at %d index", string(b[i]), i))
}
if err := helper.Determine(b[i]); err != nil {
return 0, 0, err
}
default:
if isWhitespace(b[i]) {
break loop
}
if isNewline(b[i:]) {
break loop
}
if !(helper.numberFormat == hex && isHexByte(b[i])) {
if i+2 < len(b) && !isNewline(b[i:i+2]) {
return 0, 0, NewParseError("invalid numerical character")
} else if !isNewline([]rune{b[i]}) {
return 0, 0, NewParseError("invalid numerical character")
}
break loop
}
}
}
}
return helper.Base(), i, nil
} | go | func getNumericalValue(b []rune) (int, int, error) {
if !isDigit(b[0]) {
return 0, 0, NewParseError("invalid digit value")
}
i := 0
helper := numberHelper{}
loop:
for negativeIndex := 0; i < len(b); i++ {
negativeIndex++
if !isDigit(b[i]) {
switch b[i] {
case '-':
if helper.IsNegative() || negativeIndex != 1 {
return 0, 0, NewParseError("parse error '-'")
}
n := getNegativeNumber(b[i:])
i += (n - 1)
helper.Determine(b[i])
continue
case '.':
if err := helper.Determine(b[i]); err != nil {
return 0, 0, err
}
case 'e', 'E':
if err := helper.Determine(b[i]); err != nil {
return 0, 0, err
}
negativeIndex = 0
case 'b':
if helper.numberFormat == hex {
break
}
fallthrough
case 'o', 'x':
if i == 0 && b[i] != '0' {
return 0, 0, NewParseError("incorrect base format, expected leading '0'")
}
if i != 1 {
return 0, 0, NewParseError(fmt.Sprintf("incorrect base format found %s at %d index", string(b[i]), i))
}
if err := helper.Determine(b[i]); err != nil {
return 0, 0, err
}
default:
if isWhitespace(b[i]) {
break loop
}
if isNewline(b[i:]) {
break loop
}
if !(helper.numberFormat == hex && isHexByte(b[i])) {
if i+2 < len(b) && !isNewline(b[i:i+2]) {
return 0, 0, NewParseError("invalid numerical character")
} else if !isNewline([]rune{b[i]}) {
return 0, 0, NewParseError("invalid numerical character")
}
break loop
}
}
}
}
return helper.Base(), i, nil
} | [
"func",
"getNumericalValue",
"(",
"b",
"[",
"]",
"rune",
")",
"(",
"int",
",",
"int",
",",
"error",
")",
"{",
"if",
"!",
"isDigit",
"(",
"b",
"[",
"0",
"]",
")",
"{",
"return",
"0",
",",
"0",
",",
"NewParseError",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"i",
":=",
"0",
"\n",
"helper",
":=",
"numberHelper",
"{",
"}",
"\n\n",
"loop",
":",
"for",
"negativeIndex",
":=",
"0",
";",
"i",
"<",
"len",
"(",
"b",
")",
";",
"i",
"++",
"{",
"negativeIndex",
"++",
"\n\n",
"if",
"!",
"isDigit",
"(",
"b",
"[",
"i",
"]",
")",
"{",
"switch",
"b",
"[",
"i",
"]",
"{",
"case",
"'-'",
":",
"if",
"helper",
".",
"IsNegative",
"(",
")",
"||",
"negativeIndex",
"!=",
"1",
"{",
"return",
"0",
",",
"0",
",",
"NewParseError",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"n",
":=",
"getNegativeNumber",
"(",
"b",
"[",
"i",
":",
"]",
")",
"\n",
"i",
"+=",
"(",
"n",
"-",
"1",
")",
"\n",
"helper",
".",
"Determine",
"(",
"b",
"[",
"i",
"]",
")",
"\n",
"continue",
"\n",
"case",
"'.'",
":",
"if",
"err",
":=",
"helper",
".",
"Determine",
"(",
"b",
"[",
"i",
"]",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"0",
",",
"0",
",",
"err",
"\n",
"}",
"\n",
"case",
"'e'",
",",
"'E'",
":",
"if",
"err",
":=",
"helper",
".",
"Determine",
"(",
"b",
"[",
"i",
"]",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"0",
",",
"0",
",",
"err",
"\n",
"}",
"\n\n",
"negativeIndex",
"=",
"0",
"\n",
"case",
"'b'",
":",
"if",
"helper",
".",
"numberFormat",
"==",
"hex",
"{",
"break",
"\n",
"}",
"\n",
"fallthrough",
"\n",
"case",
"'o'",
",",
"'x'",
":",
"if",
"i",
"==",
"0",
"&&",
"b",
"[",
"i",
"]",
"!=",
"'0'",
"{",
"return",
"0",
",",
"0",
",",
"NewParseError",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"if",
"i",
"!=",
"1",
"{",
"return",
"0",
",",
"0",
",",
"NewParseError",
"(",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"string",
"(",
"b",
"[",
"i",
"]",
")",
",",
"i",
")",
")",
"\n",
"}",
"\n\n",
"if",
"err",
":=",
"helper",
".",
"Determine",
"(",
"b",
"[",
"i",
"]",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"0",
",",
"0",
",",
"err",
"\n",
"}",
"\n",
"default",
":",
"if",
"isWhitespace",
"(",
"b",
"[",
"i",
"]",
")",
"{",
"break",
"loop",
"\n",
"}",
"\n\n",
"if",
"isNewline",
"(",
"b",
"[",
"i",
":",
"]",
")",
"{",
"break",
"loop",
"\n",
"}",
"\n\n",
"if",
"!",
"(",
"helper",
".",
"numberFormat",
"==",
"hex",
"&&",
"isHexByte",
"(",
"b",
"[",
"i",
"]",
")",
")",
"{",
"if",
"i",
"+",
"2",
"<",
"len",
"(",
"b",
")",
"&&",
"!",
"isNewline",
"(",
"b",
"[",
"i",
":",
"i",
"+",
"2",
"]",
")",
"{",
"return",
"0",
",",
"0",
",",
"NewParseError",
"(",
"\"",
"\"",
")",
"\n",
"}",
"else",
"if",
"!",
"isNewline",
"(",
"[",
"]",
"rune",
"{",
"b",
"[",
"i",
"]",
"}",
")",
"{",
"return",
"0",
",",
"0",
",",
"NewParseError",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"break",
"loop",
"\n",
"}",
"\n",
"}",
"\n",
"}",
"\n",
"}",
"\n\n",
"return",
"helper",
".",
"Base",
"(",
")",
",",
"i",
",",
"nil",
"\n",
"}"
] | // getNumericalValue will return a numerical string, the amount
// of bytes read, and the base of the number
//
// an error will be returned if the number is not of a correct
// value | [
"getNumericalValue",
"will",
"return",
"a",
"numerical",
"string",
"the",
"amount",
"of",
"bytes",
"read",
"and",
"the",
"base",
"of",
"the",
"number",
"an",
"error",
"will",
"be",
"returned",
"if",
"the",
"number",
"is",
"not",
"of",
"a",
"correct",
"value"
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/internal/ini/value_util.go#L77-L150 |
3 | aws/aws-sdk-go | internal/ini/value_util.go | getNegativeNumber | func getNegativeNumber(b []rune) int {
if b[0] != '-' {
return 0
}
i := 1
for ; i < len(b); i++ {
if !isDigit(b[i]) {
return i
}
}
return i
} | go | func getNegativeNumber(b []rune) int {
if b[0] != '-' {
return 0
}
i := 1
for ; i < len(b); i++ {
if !isDigit(b[i]) {
return i
}
}
return i
} | [
"func",
"getNegativeNumber",
"(",
"b",
"[",
"]",
"rune",
")",
"int",
"{",
"if",
"b",
"[",
"0",
"]",
"!=",
"'-'",
"{",
"return",
"0",
"\n",
"}",
"\n\n",
"i",
":=",
"1",
"\n",
"for",
";",
"i",
"<",
"len",
"(",
"b",
")",
";",
"i",
"++",
"{",
"if",
"!",
"isDigit",
"(",
"b",
"[",
"i",
"]",
")",
"{",
"return",
"i",
"\n",
"}",
"\n",
"}",
"\n\n",
"return",
"i",
"\n",
"}"
] | // getNegativeNumber will return a negative number from a
// byte slice. This will iterate through all characters until
// a non-digit has been found. | [
"getNegativeNumber",
"will",
"return",
"a",
"negative",
"number",
"from",
"a",
"byte",
"slice",
".",
"This",
"will",
"iterate",
"through",
"all",
"characters",
"until",
"a",
"non",
"-",
"digit",
"has",
"been",
"found",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/internal/ini/value_util.go#L217-L230 |
4 | aws/aws-sdk-go | internal/ini/value_util.go | isEscaped | func isEscaped(value []rune, b rune) bool {
if len(value) == 0 {
return false
}
switch b {
case '\'': // single quote
case '"': // quote
case 'n': // newline
case 't': // tab
case '\\': // backslash
default:
return false
}
return value[len(value)-1] == '\\'
} | go | func isEscaped(value []rune, b rune) bool {
if len(value) == 0 {
return false
}
switch b {
case '\'': // single quote
case '"': // quote
case 'n': // newline
case 't': // tab
case '\\': // backslash
default:
return false
}
return value[len(value)-1] == '\\'
} | [
"func",
"isEscaped",
"(",
"value",
"[",
"]",
"rune",
",",
"b",
"rune",
")",
"bool",
"{",
"if",
"len",
"(",
"value",
")",
"==",
"0",
"{",
"return",
"false",
"\n",
"}",
"\n\n",
"switch",
"b",
"{",
"case",
"'\\''",
":",
"// single quote",
"case",
"'\"'",
":",
"// quote",
"case",
"'n'",
":",
"// newline",
"case",
"'t'",
":",
"// tab",
"case",
"'\\\\'",
":",
"// backslash",
"default",
":",
"return",
"false",
"\n",
"}",
"\n\n",
"return",
"value",
"[",
"len",
"(",
"value",
")",
"-",
"1",
"]",
"==",
"'\\\\'",
"\n",
"}"
] | // isEscaped will return whether or not the character is an escaped
// character. | [
"isEscaped",
"will",
"return",
"whether",
"or",
"not",
"the",
"character",
"is",
"an",
"escaped",
"character",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/internal/ini/value_util.go#L234-L250 |
5 | aws/aws-sdk-go | internal/ini/ini.go | OpenFile | func OpenFile(path string) (Sections, error) {
f, err := os.Open(path)
if err != nil {
return Sections{}, awserr.New(ErrCodeUnableToReadFile, "unable to open file", err)
}
defer f.Close()
return Parse(f)
} | go | func OpenFile(path string) (Sections, error) {
f, err := os.Open(path)
if err != nil {
return Sections{}, awserr.New(ErrCodeUnableToReadFile, "unable to open file", err)
}
defer f.Close()
return Parse(f)
} | [
"func",
"OpenFile",
"(",
"path",
"string",
")",
"(",
"Sections",
",",
"error",
")",
"{",
"f",
",",
"err",
":=",
"os",
".",
"Open",
"(",
"path",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"Sections",
"{",
"}",
",",
"awserr",
".",
"New",
"(",
"ErrCodeUnableToReadFile",
",",
"\"",
"\"",
",",
"err",
")",
"\n",
"}",
"\n",
"defer",
"f",
".",
"Close",
"(",
")",
"\n\n",
"return",
"Parse",
"(",
"f",
")",
"\n",
"}"
] | // OpenFile takes a path to a given file, and will open and parse
// that file. | [
"OpenFile",
"takes",
"a",
"path",
"to",
"a",
"given",
"file",
"and",
"will",
"open",
"and",
"parse",
"that",
"file",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/internal/ini/ini.go#L12-L20 |
6 | aws/aws-sdk-go | internal/ini/ini.go | Parse | func Parse(f io.Reader) (Sections, error) {
tree, err := ParseAST(f)
if err != nil {
return Sections{}, err
}
v := NewDefaultVisitor()
if err = Walk(tree, v); err != nil {
return Sections{}, err
}
return v.Sections, nil
} | go | func Parse(f io.Reader) (Sections, error) {
tree, err := ParseAST(f)
if err != nil {
return Sections{}, err
}
v := NewDefaultVisitor()
if err = Walk(tree, v); err != nil {
return Sections{}, err
}
return v.Sections, nil
} | [
"func",
"Parse",
"(",
"f",
"io",
".",
"Reader",
")",
"(",
"Sections",
",",
"error",
")",
"{",
"tree",
",",
"err",
":=",
"ParseAST",
"(",
"f",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"Sections",
"{",
"}",
",",
"err",
"\n",
"}",
"\n\n",
"v",
":=",
"NewDefaultVisitor",
"(",
")",
"\n",
"if",
"err",
"=",
"Walk",
"(",
"tree",
",",
"v",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"Sections",
"{",
"}",
",",
"err",
"\n",
"}",
"\n\n",
"return",
"v",
".",
"Sections",
",",
"nil",
"\n",
"}"
] | // Parse will parse the given file using the shared config
// visitor. | [
"Parse",
"will",
"parse",
"the",
"given",
"file",
"using",
"the",
"shared",
"config",
"visitor",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/internal/ini/ini.go#L24-L36 |
7 | aws/aws-sdk-go | internal/ini/ini.go | ParseBytes | func ParseBytes(b []byte) (Sections, error) {
tree, err := ParseASTBytes(b)
if err != nil {
return Sections{}, err
}
v := NewDefaultVisitor()
if err = Walk(tree, v); err != nil {
return Sections{}, err
}
return v.Sections, nil
} | go | func ParseBytes(b []byte) (Sections, error) {
tree, err := ParseASTBytes(b)
if err != nil {
return Sections{}, err
}
v := NewDefaultVisitor()
if err = Walk(tree, v); err != nil {
return Sections{}, err
}
return v.Sections, nil
} | [
"func",
"ParseBytes",
"(",
"b",
"[",
"]",
"byte",
")",
"(",
"Sections",
",",
"error",
")",
"{",
"tree",
",",
"err",
":=",
"ParseASTBytes",
"(",
"b",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"Sections",
"{",
"}",
",",
"err",
"\n",
"}",
"\n\n",
"v",
":=",
"NewDefaultVisitor",
"(",
")",
"\n",
"if",
"err",
"=",
"Walk",
"(",
"tree",
",",
"v",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"Sections",
"{",
"}",
",",
"err",
"\n",
"}",
"\n\n",
"return",
"v",
".",
"Sections",
",",
"nil",
"\n",
"}"
] | // ParseBytes will parse the given bytes and return the parsed sections. | [
"ParseBytes",
"will",
"parse",
"the",
"given",
"bytes",
"and",
"return",
"the",
"parsed",
"sections",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/internal/ini/ini.go#L39-L51 |
8 | aws/aws-sdk-go | private/model/api/smoke.go | BuildInputShape | func (c SmokeTestCase) BuildInputShape(ref *ShapeRef) string {
var b ShapeValueBuilder
return fmt.Sprintf("&%s{\n%s\n}",
b.GoType(ref, true),
b.BuildShape(ref, c.Input, false),
)
} | go | func (c SmokeTestCase) BuildInputShape(ref *ShapeRef) string {
var b ShapeValueBuilder
return fmt.Sprintf("&%s{\n%s\n}",
b.GoType(ref, true),
b.BuildShape(ref, c.Input, false),
)
} | [
"func",
"(",
"c",
"SmokeTestCase",
")",
"BuildInputShape",
"(",
"ref",
"*",
"ShapeRef",
")",
"string",
"{",
"var",
"b",
"ShapeValueBuilder",
"\n",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\\n",
"\\n",
"\"",
",",
"b",
".",
"GoType",
"(",
"ref",
",",
"true",
")",
",",
"b",
".",
"BuildShape",
"(",
"ref",
",",
"c",
".",
"Input",
",",
"false",
")",
",",
")",
"\n",
"}"
] | // BuildInputShape returns the Go code as a string for initializing the test
// case's input shape. | [
"BuildInputShape",
"returns",
"the",
"Go",
"code",
"as",
"a",
"string",
"for",
"initializing",
"the",
"test",
"case",
"s",
"input",
"shape",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/model/api/smoke.go#L29-L35 |
9 | aws/aws-sdk-go | service/lexmodelbuildingservice/api.go | SetMessageVersion | func (s *CodeHook) SetMessageVersion(v string) *CodeHook {
s.MessageVersion = &v
return s
} | go | func (s *CodeHook) SetMessageVersion(v string) *CodeHook {
s.MessageVersion = &v
return s
} | [
"func",
"(",
"s",
"*",
"CodeHook",
")",
"SetMessageVersion",
"(",
"v",
"string",
")",
"*",
"CodeHook",
"{",
"s",
".",
"MessageVersion",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetMessageVersion sets the MessageVersion field's value. | [
"SetMessageVersion",
"sets",
"the",
"MessageVersion",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/lexmodelbuildingservice/api.go#L4633-L4636 |
10 | aws/aws-sdk-go | service/lexmodelbuildingservice/api.go | SetPrompt | func (s *FollowUpPrompt) SetPrompt(v *Prompt) *FollowUpPrompt {
s.Prompt = v
return s
} | go | func (s *FollowUpPrompt) SetPrompt(v *Prompt) *FollowUpPrompt {
s.Prompt = v
return s
} | [
"func",
"(",
"s",
"*",
"FollowUpPrompt",
")",
"SetPrompt",
"(",
"v",
"*",
"Prompt",
")",
"*",
"FollowUpPrompt",
"{",
"s",
".",
"Prompt",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetPrompt sets the Prompt field's value. | [
"SetPrompt",
"sets",
"the",
"Prompt",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/lexmodelbuildingservice/api.go#L5969-L5972 |
11 | aws/aws-sdk-go | service/lexmodelbuildingservice/api.go | SetCodeHook | func (s *FulfillmentActivity) SetCodeHook(v *CodeHook) *FulfillmentActivity {
s.CodeHook = v
return s
} | go | func (s *FulfillmentActivity) SetCodeHook(v *CodeHook) *FulfillmentActivity {
s.CodeHook = v
return s
} | [
"func",
"(",
"s",
"*",
"FulfillmentActivity",
")",
"SetCodeHook",
"(",
"v",
"*",
"CodeHook",
")",
"*",
"FulfillmentActivity",
"{",
"s",
".",
"CodeHook",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetCodeHook sets the CodeHook field's value. | [
"SetCodeHook",
"sets",
"the",
"CodeHook",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/lexmodelbuildingservice/api.go#L6040-L6043 |
12 | aws/aws-sdk-go | service/lexmodelbuildingservice/api.go | SetBotAliases | func (s *GetBotAliasesOutput) SetBotAliases(v []*BotAliasMetadata) *GetBotAliasesOutput {
s.BotAliases = v
return s
} | go | func (s *GetBotAliasesOutput) SetBotAliases(v []*BotAliasMetadata) *GetBotAliasesOutput {
s.BotAliases = v
return s
} | [
"func",
"(",
"s",
"*",
"GetBotAliasesOutput",
")",
"SetBotAliases",
"(",
"v",
"[",
"]",
"*",
"BotAliasMetadata",
")",
"*",
"GetBotAliasesOutput",
"{",
"s",
".",
"BotAliases",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetBotAliases sets the BotAliases field's value. | [
"SetBotAliases",
"sets",
"the",
"BotAliases",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/lexmodelbuildingservice/api.go#L6291-L6294 |
13 | aws/aws-sdk-go | service/lexmodelbuildingservice/api.go | SetBotChannelAssociations | func (s *GetBotChannelAssociationsOutput) SetBotChannelAssociations(v []*BotChannelAssociation) *GetBotChannelAssociationsOutput {
s.BotChannelAssociations = v
return s
} | go | func (s *GetBotChannelAssociationsOutput) SetBotChannelAssociations(v []*BotChannelAssociation) *GetBotChannelAssociationsOutput {
s.BotChannelAssociations = v
return s
} | [
"func",
"(",
"s",
"*",
"GetBotChannelAssociationsOutput",
")",
"SetBotChannelAssociations",
"(",
"v",
"[",
"]",
"*",
"BotChannelAssociation",
")",
"*",
"GetBotChannelAssociationsOutput",
"{",
"s",
".",
"BotChannelAssociations",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetBotChannelAssociations sets the BotChannelAssociations field's value. | [
"SetBotChannelAssociations",
"sets",
"the",
"BotChannelAssociations",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/lexmodelbuildingservice/api.go#L6608-L6611 |
14 | aws/aws-sdk-go | service/lexmodelbuildingservice/api.go | SetVersionOrAlias | func (s *GetBotInput) SetVersionOrAlias(v string) *GetBotInput {
s.VersionOrAlias = &v
return s
} | go | func (s *GetBotInput) SetVersionOrAlias(v string) *GetBotInput {
s.VersionOrAlias = &v
return s
} | [
"func",
"(",
"s",
"*",
"GetBotInput",
")",
"SetVersionOrAlias",
"(",
"v",
"string",
")",
"*",
"GetBotInput",
"{",
"s",
".",
"VersionOrAlias",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetVersionOrAlias sets the VersionOrAlias field's value. | [
"SetVersionOrAlias",
"sets",
"the",
"VersionOrAlias",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/lexmodelbuildingservice/api.go#L6672-L6675 |
15 | aws/aws-sdk-go | service/lexmodelbuildingservice/api.go | SetBotVersions | func (s *GetUtterancesViewInput) SetBotVersions(v []*string) *GetUtterancesViewInput {
s.BotVersions = v
return s
} | go | func (s *GetUtterancesViewInput) SetBotVersions(v []*string) *GetUtterancesViewInput {
s.BotVersions = v
return s
} | [
"func",
"(",
"s",
"*",
"GetUtterancesViewInput",
")",
"SetBotVersions",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"GetUtterancesViewInput",
"{",
"s",
".",
"BotVersions",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetBotVersions sets the BotVersions field's value. | [
"SetBotVersions",
"sets",
"the",
"BotVersions",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/lexmodelbuildingservice/api.go#L8459-L8462 |
16 | aws/aws-sdk-go | service/lexmodelbuildingservice/api.go | SetIntentVersion | func (s *Intent) SetIntentVersion(v string) *Intent {
s.IntentVersion = &v
return s
} | go | func (s *Intent) SetIntentVersion(v string) *Intent {
s.IntentVersion = &v
return s
} | [
"func",
"(",
"s",
"*",
"Intent",
")",
"SetIntentVersion",
"(",
"v",
"string",
")",
"*",
"Intent",
"{",
"s",
".",
"IntentVersion",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetIntentVersion sets the IntentVersion field's value. | [
"SetIntentVersion",
"sets",
"the",
"IntentVersion",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/lexmodelbuildingservice/api.go#L8558-L8561 |
17 | aws/aws-sdk-go | service/lexmodelbuildingservice/api.go | SetGroupNumber | func (s *Message) SetGroupNumber(v int64) *Message {
s.GroupNumber = &v
return s
} | go | func (s *Message) SetGroupNumber(v int64) *Message {
s.GroupNumber = &v
return s
} | [
"func",
"(",
"s",
"*",
"Message",
")",
"SetGroupNumber",
"(",
"v",
"int64",
")",
"*",
"Message",
"{",
"s",
".",
"GroupNumber",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetGroupNumber sets the GroupNumber field's value. | [
"SetGroupNumber",
"sets",
"the",
"GroupNumber",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/lexmodelbuildingservice/api.go#L8689-L8692 |
18 | aws/aws-sdk-go | service/lexmodelbuildingservice/api.go | SetProcessBehavior | func (s *PutBotInput) SetProcessBehavior(v string) *PutBotInput {
s.ProcessBehavior = &v
return s
} | go | func (s *PutBotInput) SetProcessBehavior(v string) *PutBotInput {
s.ProcessBehavior = &v
return s
} | [
"func",
"(",
"s",
"*",
"PutBotInput",
")",
"SetProcessBehavior",
"(",
"v",
"string",
")",
"*",
"PutBotInput",
"{",
"s",
".",
"ProcessBehavior",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetProcessBehavior sets the ProcessBehavior field's value. | [
"SetProcessBehavior",
"sets",
"the",
"ProcessBehavior",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/lexmodelbuildingservice/api.go#L9201-L9204 |
19 | aws/aws-sdk-go | service/lexmodelbuildingservice/api.go | SetSlotConstraint | func (s *Slot) SetSlotConstraint(v string) *Slot {
s.SlotConstraint = &v
return s
} | go | func (s *Slot) SetSlotConstraint(v string) *Slot {
s.SlotConstraint = &v
return s
} | [
"func",
"(",
"s",
"*",
"Slot",
")",
"SetSlotConstraint",
"(",
"v",
"string",
")",
"*",
"Slot",
"{",
"s",
".",
"SlotConstraint",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetSlotConstraint sets the SlotConstraint field's value. | [
"SetSlotConstraint",
"sets",
"the",
"SlotConstraint",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/lexmodelbuildingservice/api.go#L10223-L10226 |
20 | aws/aws-sdk-go | service/lexmodelbuildingservice/api.go | SetSlotType | func (s *Slot) SetSlotType(v string) *Slot {
s.SlotType = &v
return s
} | go | func (s *Slot) SetSlotType(v string) *Slot {
s.SlotType = &v
return s
} | [
"func",
"(",
"s",
"*",
"Slot",
")",
"SetSlotType",
"(",
"v",
"string",
")",
"*",
"Slot",
"{",
"s",
".",
"SlotType",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetSlotType sets the SlotType field's value. | [
"SetSlotType",
"sets",
"the",
"SlotType",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/lexmodelbuildingservice/api.go#L10229-L10232 |
21 | aws/aws-sdk-go | service/lexmodelbuildingservice/api.go | SetSlotTypeVersion | func (s *Slot) SetSlotTypeVersion(v string) *Slot {
s.SlotTypeVersion = &v
return s
} | go | func (s *Slot) SetSlotTypeVersion(v string) *Slot {
s.SlotTypeVersion = &v
return s
} | [
"func",
"(",
"s",
"*",
"Slot",
")",
"SetSlotTypeVersion",
"(",
"v",
"string",
")",
"*",
"Slot",
"{",
"s",
".",
"SlotTypeVersion",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetSlotTypeVersion sets the SlotTypeVersion field's value. | [
"SetSlotTypeVersion",
"sets",
"the",
"SlotTypeVersion",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/lexmodelbuildingservice/api.go#L10235-L10238 |
22 | aws/aws-sdk-go | service/lexmodelbuildingservice/api.go | SetValueElicitationPrompt | func (s *Slot) SetValueElicitationPrompt(v *Prompt) *Slot {
s.ValueElicitationPrompt = v
return s
} | go | func (s *Slot) SetValueElicitationPrompt(v *Prompt) *Slot {
s.ValueElicitationPrompt = v
return s
} | [
"func",
"(",
"s",
"*",
"Slot",
")",
"SetValueElicitationPrompt",
"(",
"v",
"*",
"Prompt",
")",
"*",
"Slot",
"{",
"s",
".",
"ValueElicitationPrompt",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetValueElicitationPrompt sets the ValueElicitationPrompt field's value. | [
"SetValueElicitationPrompt",
"sets",
"the",
"ValueElicitationPrompt",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/lexmodelbuildingservice/api.go#L10241-L10244 |
23 | aws/aws-sdk-go | service/lexmodelbuildingservice/api.go | SetDistinctUsers | func (s *UtteranceData) SetDistinctUsers(v int64) *UtteranceData {
s.DistinctUsers = &v
return s
} | go | func (s *UtteranceData) SetDistinctUsers(v int64) *UtteranceData {
s.DistinctUsers = &v
return s
} | [
"func",
"(",
"s",
"*",
"UtteranceData",
")",
"SetDistinctUsers",
"(",
"v",
"int64",
")",
"*",
"UtteranceData",
"{",
"s",
".",
"DistinctUsers",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetDistinctUsers sets the DistinctUsers field's value. | [
"SetDistinctUsers",
"sets",
"the",
"DistinctUsers",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/lexmodelbuildingservice/api.go#L10567-L10570 |
24 | aws/aws-sdk-go | service/lexmodelbuildingservice/api.go | SetFirstUtteredDate | func (s *UtteranceData) SetFirstUtteredDate(v time.Time) *UtteranceData {
s.FirstUtteredDate = &v
return s
} | go | func (s *UtteranceData) SetFirstUtteredDate(v time.Time) *UtteranceData {
s.FirstUtteredDate = &v
return s
} | [
"func",
"(",
"s",
"*",
"UtteranceData",
")",
"SetFirstUtteredDate",
"(",
"v",
"time",
".",
"Time",
")",
"*",
"UtteranceData",
"{",
"s",
".",
"FirstUtteredDate",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetFirstUtteredDate sets the FirstUtteredDate field's value. | [
"SetFirstUtteredDate",
"sets",
"the",
"FirstUtteredDate",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/lexmodelbuildingservice/api.go#L10573-L10576 |
25 | aws/aws-sdk-go | service/lexmodelbuildingservice/api.go | SetLastUtteredDate | func (s *UtteranceData) SetLastUtteredDate(v time.Time) *UtteranceData {
s.LastUtteredDate = &v
return s
} | go | func (s *UtteranceData) SetLastUtteredDate(v time.Time) *UtteranceData {
s.LastUtteredDate = &v
return s
} | [
"func",
"(",
"s",
"*",
"UtteranceData",
")",
"SetLastUtteredDate",
"(",
"v",
"time",
".",
"Time",
")",
"*",
"UtteranceData",
"{",
"s",
".",
"LastUtteredDate",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetLastUtteredDate sets the LastUtteredDate field's value. | [
"SetLastUtteredDate",
"sets",
"the",
"LastUtteredDate",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/lexmodelbuildingservice/api.go#L10579-L10582 |
26 | aws/aws-sdk-go | service/lexmodelbuildingservice/api.go | SetUtteranceString | func (s *UtteranceData) SetUtteranceString(v string) *UtteranceData {
s.UtteranceString = &v
return s
} | go | func (s *UtteranceData) SetUtteranceString(v string) *UtteranceData {
s.UtteranceString = &v
return s
} | [
"func",
"(",
"s",
"*",
"UtteranceData",
")",
"SetUtteranceString",
"(",
"v",
"string",
")",
"*",
"UtteranceData",
"{",
"s",
".",
"UtteranceString",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetUtteranceString sets the UtteranceString field's value. | [
"SetUtteranceString",
"sets",
"the",
"UtteranceString",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/lexmodelbuildingservice/api.go#L10585-L10588 |
27 | aws/aws-sdk-go | service/s3/s3crypto/kms_key_handler.go | decryptHandler | func (kp kmsKeyHandler) decryptHandler(env Envelope) (CipherDataDecrypter, error) {
m := MaterialDescription{}
err := m.decodeDescription([]byte(env.MatDesc))
if err != nil {
return nil, err
}
cmkID, ok := m["kms_cmk_id"]
if !ok {
return nil, awserr.New("MissingCMKIDError", "Material description is missing CMK ID", nil)
}
kp.CipherData.MaterialDescription = m
kp.cmkID = cmkID
kp.WrapAlgorithm = KMSWrap
return &kp, nil
} | go | func (kp kmsKeyHandler) decryptHandler(env Envelope) (CipherDataDecrypter, error) {
m := MaterialDescription{}
err := m.decodeDescription([]byte(env.MatDesc))
if err != nil {
return nil, err
}
cmkID, ok := m["kms_cmk_id"]
if !ok {
return nil, awserr.New("MissingCMKIDError", "Material description is missing CMK ID", nil)
}
kp.CipherData.MaterialDescription = m
kp.cmkID = cmkID
kp.WrapAlgorithm = KMSWrap
return &kp, nil
} | [
"func",
"(",
"kp",
"kmsKeyHandler",
")",
"decryptHandler",
"(",
"env",
"Envelope",
")",
"(",
"CipherDataDecrypter",
",",
"error",
")",
"{",
"m",
":=",
"MaterialDescription",
"{",
"}",
"\n",
"err",
":=",
"m",
".",
"decodeDescription",
"(",
"[",
"]",
"byte",
"(",
"env",
".",
"MatDesc",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"cmkID",
",",
"ok",
":=",
"m",
"[",
"\"",
"\"",
"]",
"\n",
"if",
"!",
"ok",
"{",
"return",
"nil",
",",
"awserr",
".",
"New",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
")",
"\n",
"}",
"\n\n",
"kp",
".",
"CipherData",
".",
"MaterialDescription",
"=",
"m",
"\n",
"kp",
".",
"cmkID",
"=",
"cmkID",
"\n",
"kp",
".",
"WrapAlgorithm",
"=",
"KMSWrap",
"\n",
"return",
"&",
"kp",
",",
"nil",
"\n",
"}"
] | // decryptHandler initializes a KMS keyprovider with a material description. This
// is used with Decrypting kms content, due to the cmkID being in the material description. | [
"decryptHandler",
"initializes",
"a",
"KMS",
"keyprovider",
"with",
"a",
"material",
"description",
".",
"This",
"is",
"used",
"with",
"Decrypting",
"kms",
"content",
"due",
"to",
"the",
"cmkID",
"being",
"in",
"the",
"material",
"description",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/s3crypto/kms_key_handler.go#L81-L97 |
28 | aws/aws-sdk-go | service/s3/s3crypto/kms_key_handler.go | DecryptKey | func (kp *kmsKeyHandler) DecryptKey(key []byte) ([]byte, error) {
out, err := kp.kms.Decrypt(&kms.DecryptInput{
EncryptionContext: map[string]*string(kp.CipherData.MaterialDescription),
CiphertextBlob: key,
GrantTokens: []*string{},
})
if err != nil {
return nil, err
}
return out.Plaintext, nil
} | go | func (kp *kmsKeyHandler) DecryptKey(key []byte) ([]byte, error) {
out, err := kp.kms.Decrypt(&kms.DecryptInput{
EncryptionContext: map[string]*string(kp.CipherData.MaterialDescription),
CiphertextBlob: key,
GrantTokens: []*string{},
})
if err != nil {
return nil, err
}
return out.Plaintext, nil
} | [
"func",
"(",
"kp",
"*",
"kmsKeyHandler",
")",
"DecryptKey",
"(",
"key",
"[",
"]",
"byte",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"out",
",",
"err",
":=",
"kp",
".",
"kms",
".",
"Decrypt",
"(",
"&",
"kms",
".",
"DecryptInput",
"{",
"EncryptionContext",
":",
"map",
"[",
"string",
"]",
"*",
"string",
"(",
"kp",
".",
"CipherData",
".",
"MaterialDescription",
")",
",",
"CiphertextBlob",
":",
"key",
",",
"GrantTokens",
":",
"[",
"]",
"*",
"string",
"{",
"}",
",",
"}",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n",
"return",
"out",
".",
"Plaintext",
",",
"nil",
"\n",
"}"
] | // DecryptKey makes a call to KMS to decrypt the key. | [
"DecryptKey",
"makes",
"a",
"call",
"to",
"KMS",
"to",
"decrypt",
"the",
"key",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/s3crypto/kms_key_handler.go#L100-L110 |
29 | aws/aws-sdk-go | service/s3/s3crypto/kms_key_handler.go | GenerateCipherData | func (kp *kmsKeyHandler) GenerateCipherData(keySize, ivSize int) (CipherData, error) {
out, err := kp.kms.GenerateDataKey(&kms.GenerateDataKeyInput{
EncryptionContext: kp.CipherData.MaterialDescription,
KeyId: kp.cmkID,
KeySpec: aws.String("AES_256"),
})
if err != nil {
return CipherData{}, err
}
iv := generateBytes(ivSize)
cd := CipherData{
Key: out.Plaintext,
IV: iv,
WrapAlgorithm: KMSWrap,
MaterialDescription: kp.CipherData.MaterialDescription,
EncryptedKey: out.CiphertextBlob,
}
return cd, nil
} | go | func (kp *kmsKeyHandler) GenerateCipherData(keySize, ivSize int) (CipherData, error) {
out, err := kp.kms.GenerateDataKey(&kms.GenerateDataKeyInput{
EncryptionContext: kp.CipherData.MaterialDescription,
KeyId: kp.cmkID,
KeySpec: aws.String("AES_256"),
})
if err != nil {
return CipherData{}, err
}
iv := generateBytes(ivSize)
cd := CipherData{
Key: out.Plaintext,
IV: iv,
WrapAlgorithm: KMSWrap,
MaterialDescription: kp.CipherData.MaterialDescription,
EncryptedKey: out.CiphertextBlob,
}
return cd, nil
} | [
"func",
"(",
"kp",
"*",
"kmsKeyHandler",
")",
"GenerateCipherData",
"(",
"keySize",
",",
"ivSize",
"int",
")",
"(",
"CipherData",
",",
"error",
")",
"{",
"out",
",",
"err",
":=",
"kp",
".",
"kms",
".",
"GenerateDataKey",
"(",
"&",
"kms",
".",
"GenerateDataKeyInput",
"{",
"EncryptionContext",
":",
"kp",
".",
"CipherData",
".",
"MaterialDescription",
",",
"KeyId",
":",
"kp",
".",
"cmkID",
",",
"KeySpec",
":",
"aws",
".",
"String",
"(",
"\"",
"\"",
")",
",",
"}",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"CipherData",
"{",
"}",
",",
"err",
"\n",
"}",
"\n\n",
"iv",
":=",
"generateBytes",
"(",
"ivSize",
")",
"\n",
"cd",
":=",
"CipherData",
"{",
"Key",
":",
"out",
".",
"Plaintext",
",",
"IV",
":",
"iv",
",",
"WrapAlgorithm",
":",
"KMSWrap",
",",
"MaterialDescription",
":",
"kp",
".",
"CipherData",
".",
"MaterialDescription",
",",
"EncryptedKey",
":",
"out",
".",
"CiphertextBlob",
",",
"}",
"\n",
"return",
"cd",
",",
"nil",
"\n",
"}"
] | // GenerateCipherData makes a call to KMS to generate a data key, Upon making
// the call, it also sets the encrypted key. | [
"GenerateCipherData",
"makes",
"a",
"call",
"to",
"KMS",
"to",
"generate",
"a",
"data",
"key",
"Upon",
"making",
"the",
"call",
"it",
"also",
"sets",
"the",
"encrypted",
"key",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/s3crypto/kms_key_handler.go#L114-L133 |
30 | aws/aws-sdk-go | service/s3/s3crypto/aes_gcm_content_cipher.go | DecryptContents | func (cc *aesGCMContentCipher) DecryptContents(src io.ReadCloser) (io.ReadCloser, error) {
reader := cc.Cipher.Decrypt(src)
return &CryptoReadCloser{Body: src, Decrypter: reader}, nil
} | go | func (cc *aesGCMContentCipher) DecryptContents(src io.ReadCloser) (io.ReadCloser, error) {
reader := cc.Cipher.Decrypt(src)
return &CryptoReadCloser{Body: src, Decrypter: reader}, nil
} | [
"func",
"(",
"cc",
"*",
"aesGCMContentCipher",
")",
"DecryptContents",
"(",
"src",
"io",
".",
"ReadCloser",
")",
"(",
"io",
".",
"ReadCloser",
",",
"error",
")",
"{",
"reader",
":=",
"cc",
".",
"Cipher",
".",
"Decrypt",
"(",
"src",
")",
"\n",
"return",
"&",
"CryptoReadCloser",
"{",
"Body",
":",
"src",
",",
"Decrypter",
":",
"reader",
"}",
",",
"nil",
"\n",
"}"
] | // DecryptContents will use the symmetric key provider to instantiate a new GCM cipher.
// We grab a decrypt reader from gcm and wrap it in a CryptoReadCloser. The only error
// expected here is when the key or iv is of invalid length. | [
"DecryptContents",
"will",
"use",
"the",
"symmetric",
"key",
"provider",
"to",
"instantiate",
"a",
"new",
"GCM",
"cipher",
".",
"We",
"grab",
"a",
"decrypt",
"reader",
"from",
"gcm",
"and",
"wrap",
"it",
"in",
"a",
"CryptoReadCloser",
".",
"The",
"only",
"error",
"expected",
"here",
"is",
"when",
"the",
"key",
"or",
"iv",
"is",
"of",
"invalid",
"length",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/s3crypto/aes_gcm_content_cipher.go#L60-L63 |
31 | aws/aws-sdk-go | service/eks/api.go | SetUpdateId | func (s *DescribeUpdateInput) SetUpdateId(v string) *DescribeUpdateInput {
s.UpdateId = &v
return s
} | go | func (s *DescribeUpdateInput) SetUpdateId(v string) *DescribeUpdateInput {
s.UpdateId = &v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeUpdateInput",
")",
"SetUpdateId",
"(",
"v",
"string",
")",
"*",
"DescribeUpdateInput",
"{",
"s",
".",
"UpdateId",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetUpdateId sets the UpdateId field's value. | [
"SetUpdateId",
"sets",
"the",
"UpdateId",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/eks/api.go#L1343-L1346 |
32 | aws/aws-sdk-go | service/eks/api.go | SetUpdateIds | func (s *ListUpdatesOutput) SetUpdateIds(v []*string) *ListUpdatesOutput {
s.UpdateIds = v
return s
} | go | func (s *ListUpdatesOutput) SetUpdateIds(v []*string) *ListUpdatesOutput {
s.UpdateIds = v
return s
} | [
"func",
"(",
"s",
"*",
"ListUpdatesOutput",
")",
"SetUpdateIds",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"ListUpdatesOutput",
"{",
"s",
".",
"UpdateIds",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetUpdateIds sets the UpdateIds field's value. | [
"SetUpdateIds",
"sets",
"the",
"UpdateIds",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/eks/api.go#L1625-L1628 |
33 | aws/aws-sdk-go | service/eks/api.go | SetClusterLogging | func (s *Logging) SetClusterLogging(v []*LogSetup) *Logging {
s.ClusterLogging = v
return s
} | go | func (s *Logging) SetClusterLogging(v []*LogSetup) *Logging {
s.ClusterLogging = v
return s
} | [
"func",
"(",
"s",
"*",
"Logging",
")",
"SetClusterLogging",
"(",
"v",
"[",
"]",
"*",
"LogSetup",
")",
"*",
"Logging",
"{",
"s",
".",
"ClusterLogging",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetClusterLogging sets the ClusterLogging field's value. | [
"SetClusterLogging",
"sets",
"the",
"ClusterLogging",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/eks/api.go#L1686-L1689 |
34 | aws/aws-sdk-go | service/eks/api.go | SetParams | func (s *Update) SetParams(v []*UpdateParam) *Update {
s.Params = v
return s
} | go | func (s *Update) SetParams(v []*UpdateParam) *Update {
s.Params = v
return s
} | [
"func",
"(",
"s",
"*",
"Update",
")",
"SetParams",
"(",
"v",
"[",
"]",
"*",
"UpdateParam",
")",
"*",
"Update",
"{",
"s",
".",
"Params",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetParams sets the Params field's value. | [
"SetParams",
"sets",
"the",
"Params",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/eks/api.go#L1743-L1746 |
35 | aws/aws-sdk-go | aws/types.go | IsReaderSeekable | func IsReaderSeekable(r io.Reader) bool {
switch v := r.(type) {
case ReaderSeekerCloser:
return v.IsSeeker()
case *ReaderSeekerCloser:
return v.IsSeeker()
case io.ReadSeeker:
return true
default:
return false
}
} | go | func IsReaderSeekable(r io.Reader) bool {
switch v := r.(type) {
case ReaderSeekerCloser:
return v.IsSeeker()
case *ReaderSeekerCloser:
return v.IsSeeker()
case io.ReadSeeker:
return true
default:
return false
}
} | [
"func",
"IsReaderSeekable",
"(",
"r",
"io",
".",
"Reader",
")",
"bool",
"{",
"switch",
"v",
":=",
"r",
".",
"(",
"type",
")",
"{",
"case",
"ReaderSeekerCloser",
":",
"return",
"v",
".",
"IsSeeker",
"(",
")",
"\n",
"case",
"*",
"ReaderSeekerCloser",
":",
"return",
"v",
".",
"IsSeeker",
"(",
")",
"\n",
"case",
"io",
".",
"ReadSeeker",
":",
"return",
"true",
"\n",
"default",
":",
"return",
"false",
"\n",
"}",
"\n",
"}"
] | // IsReaderSeekable returns if the underlying reader type can be seeked. A
// io.Reader might not actually be seekable if it is the ReaderSeekerCloser
// type. | [
"IsReaderSeekable",
"returns",
"if",
"the",
"underlying",
"reader",
"type",
"can",
"be",
"seeked",
".",
"A",
"io",
".",
"Reader",
"might",
"not",
"actually",
"be",
"seekable",
"if",
"it",
"is",
"the",
"ReaderSeekerCloser",
"type",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/types.go#L30-L41 |
36 | aws/aws-sdk-go | aws/types.go | Read | func (r ReaderSeekerCloser) Read(p []byte) (int, error) {
switch t := r.r.(type) {
case io.Reader:
return t.Read(p)
}
return 0, nil
} | go | func (r ReaderSeekerCloser) Read(p []byte) (int, error) {
switch t := r.r.(type) {
case io.Reader:
return t.Read(p)
}
return 0, nil
} | [
"func",
"(",
"r",
"ReaderSeekerCloser",
")",
"Read",
"(",
"p",
"[",
"]",
"byte",
")",
"(",
"int",
",",
"error",
")",
"{",
"switch",
"t",
":=",
"r",
".",
"r",
".",
"(",
"type",
")",
"{",
"case",
"io",
".",
"Reader",
":",
"return",
"t",
".",
"Read",
"(",
"p",
")",
"\n",
"}",
"\n",
"return",
"0",
",",
"nil",
"\n",
"}"
] | // Read reads from the reader up to size of p. The number of bytes read, and
// error if it occurred will be returned.
//
// If the reader is not an io.Reader zero bytes read, and nil error will be returned.
//
// Performs the same functionality as io.Reader Read | [
"Read",
"reads",
"from",
"the",
"reader",
"up",
"to",
"size",
"of",
"p",
".",
"The",
"number",
"of",
"bytes",
"read",
"and",
"error",
"if",
"it",
"occurred",
"will",
"be",
"returned",
".",
"If",
"the",
"reader",
"is",
"not",
"an",
"io",
".",
"Reader",
"zero",
"bytes",
"read",
"and",
"nil",
"error",
"will",
"be",
"returned",
".",
"Performs",
"the",
"same",
"functionality",
"as",
"io",
".",
"Reader",
"Read"
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/types.go#L49-L55 |
37 | aws/aws-sdk-go | aws/types.go | IsSeeker | func (r ReaderSeekerCloser) IsSeeker() bool {
_, ok := r.r.(io.Seeker)
return ok
} | go | func (r ReaderSeekerCloser) IsSeeker() bool {
_, ok := r.r.(io.Seeker)
return ok
} | [
"func",
"(",
"r",
"ReaderSeekerCloser",
")",
"IsSeeker",
"(",
")",
"bool",
"{",
"_",
",",
"ok",
":=",
"r",
".",
"r",
".",
"(",
"io",
".",
"Seeker",
")",
"\n",
"return",
"ok",
"\n",
"}"
] | // IsSeeker returns if the underlying reader is also a seeker. | [
"IsSeeker",
"returns",
"if",
"the",
"underlying",
"reader",
"is",
"also",
"a",
"seeker",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/types.go#L72-L75 |
38 | aws/aws-sdk-go | aws/types.go | SeekerLen | func SeekerLen(s io.Seeker) (int64, error) {
// Determine if the seeker is actually seekable. ReaderSeekerCloser
// hides the fact that a io.Readers might not actually be seekable.
switch v := s.(type) {
case ReaderSeekerCloser:
return v.GetLen()
case *ReaderSeekerCloser:
return v.GetLen()
}
return seekerLen(s)
} | go | func SeekerLen(s io.Seeker) (int64, error) {
// Determine if the seeker is actually seekable. ReaderSeekerCloser
// hides the fact that a io.Readers might not actually be seekable.
switch v := s.(type) {
case ReaderSeekerCloser:
return v.GetLen()
case *ReaderSeekerCloser:
return v.GetLen()
}
return seekerLen(s)
} | [
"func",
"SeekerLen",
"(",
"s",
"io",
".",
"Seeker",
")",
"(",
"int64",
",",
"error",
")",
"{",
"// Determine if the seeker is actually seekable. ReaderSeekerCloser",
"// hides the fact that a io.Readers might not actually be seekable.",
"switch",
"v",
":=",
"s",
".",
"(",
"type",
")",
"{",
"case",
"ReaderSeekerCloser",
":",
"return",
"v",
".",
"GetLen",
"(",
")",
"\n",
"case",
"*",
"ReaderSeekerCloser",
":",
"return",
"v",
".",
"GetLen",
"(",
")",
"\n",
"}",
"\n\n",
"return",
"seekerLen",
"(",
"s",
")",
"\n",
"}"
] | // SeekerLen attempts to get the number of bytes remaining at the seeker's
// current position. Returns the number of bytes remaining or error. | [
"SeekerLen",
"attempts",
"to",
"get",
"the",
"number",
"of",
"bytes",
"remaining",
"at",
"the",
"seeker",
"s",
"current",
"position",
".",
"Returns",
"the",
"number",
"of",
"bytes",
"remaining",
"or",
"error",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/types.go#L110-L121 |
39 | aws/aws-sdk-go | aws/types.go | Close | func (r ReaderSeekerCloser) Close() error {
switch t := r.r.(type) {
case io.Closer:
return t.Close()
}
return nil
} | go | func (r ReaderSeekerCloser) Close() error {
switch t := r.r.(type) {
case io.Closer:
return t.Close()
}
return nil
} | [
"func",
"(",
"r",
"ReaderSeekerCloser",
")",
"Close",
"(",
")",
"error",
"{",
"switch",
"t",
":=",
"r",
".",
"r",
".",
"(",
"type",
")",
"{",
"case",
"io",
".",
"Closer",
":",
"return",
"t",
".",
"Close",
"(",
")",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}"
] | // Close closes the ReaderSeekerCloser.
//
// If the ReaderSeekerCloser is not an io.Closer nothing will be done. | [
"Close",
"closes",
"the",
"ReaderSeekerCloser",
".",
"If",
"the",
"ReaderSeekerCloser",
"is",
"not",
"an",
"io",
".",
"Closer",
"nothing",
"will",
"be",
"done",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/types.go#L145-L151 |
40 | aws/aws-sdk-go | aws/types.go | WriteAt | func (b *WriteAtBuffer) WriteAt(p []byte, pos int64) (n int, err error) {
pLen := len(p)
expLen := pos + int64(pLen)
b.m.Lock()
defer b.m.Unlock()
if int64(len(b.buf)) < expLen {
if int64(cap(b.buf)) < expLen {
if b.GrowthCoeff < 1 {
b.GrowthCoeff = 1
}
newBuf := make([]byte, expLen, int64(b.GrowthCoeff*float64(expLen)))
copy(newBuf, b.buf)
b.buf = newBuf
}
b.buf = b.buf[:expLen]
}
copy(b.buf[pos:], p)
return pLen, nil
} | go | func (b *WriteAtBuffer) WriteAt(p []byte, pos int64) (n int, err error) {
pLen := len(p)
expLen := pos + int64(pLen)
b.m.Lock()
defer b.m.Unlock()
if int64(len(b.buf)) < expLen {
if int64(cap(b.buf)) < expLen {
if b.GrowthCoeff < 1 {
b.GrowthCoeff = 1
}
newBuf := make([]byte, expLen, int64(b.GrowthCoeff*float64(expLen)))
copy(newBuf, b.buf)
b.buf = newBuf
}
b.buf = b.buf[:expLen]
}
copy(b.buf[pos:], p)
return pLen, nil
} | [
"func",
"(",
"b",
"*",
"WriteAtBuffer",
")",
"WriteAt",
"(",
"p",
"[",
"]",
"byte",
",",
"pos",
"int64",
")",
"(",
"n",
"int",
",",
"err",
"error",
")",
"{",
"pLen",
":=",
"len",
"(",
"p",
")",
"\n",
"expLen",
":=",
"pos",
"+",
"int64",
"(",
"pLen",
")",
"\n",
"b",
".",
"m",
".",
"Lock",
"(",
")",
"\n",
"defer",
"b",
".",
"m",
".",
"Unlock",
"(",
")",
"\n",
"if",
"int64",
"(",
"len",
"(",
"b",
".",
"buf",
")",
")",
"<",
"expLen",
"{",
"if",
"int64",
"(",
"cap",
"(",
"b",
".",
"buf",
")",
")",
"<",
"expLen",
"{",
"if",
"b",
".",
"GrowthCoeff",
"<",
"1",
"{",
"b",
".",
"GrowthCoeff",
"=",
"1",
"\n",
"}",
"\n",
"newBuf",
":=",
"make",
"(",
"[",
"]",
"byte",
",",
"expLen",
",",
"int64",
"(",
"b",
".",
"GrowthCoeff",
"*",
"float64",
"(",
"expLen",
")",
")",
")",
"\n",
"copy",
"(",
"newBuf",
",",
"b",
".",
"buf",
")",
"\n",
"b",
".",
"buf",
"=",
"newBuf",
"\n",
"}",
"\n",
"b",
".",
"buf",
"=",
"b",
".",
"buf",
"[",
":",
"expLen",
"]",
"\n",
"}",
"\n",
"copy",
"(",
"b",
".",
"buf",
"[",
"pos",
":",
"]",
",",
"p",
")",
"\n",
"return",
"pLen",
",",
"nil",
"\n",
"}"
] | // WriteAt writes a slice of bytes to a buffer starting at the position provided
// The number of bytes written will be returned, or error. Can overwrite previous
// written slices if the write ats overlap. | [
"WriteAt",
"writes",
"a",
"slice",
"of",
"bytes",
"to",
"a",
"buffer",
"starting",
"at",
"the",
"position",
"provided",
"The",
"number",
"of",
"bytes",
"written",
"will",
"be",
"returned",
"or",
"error",
".",
"Can",
"overwrite",
"previous",
"written",
"slices",
"if",
"the",
"write",
"ats",
"overlap",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/types.go#L176-L194 |
41 | aws/aws-sdk-go | aws/types.go | Bytes | func (b *WriteAtBuffer) Bytes() []byte {
b.m.Lock()
defer b.m.Unlock()
return b.buf
} | go | func (b *WriteAtBuffer) Bytes() []byte {
b.m.Lock()
defer b.m.Unlock()
return b.buf
} | [
"func",
"(",
"b",
"*",
"WriteAtBuffer",
")",
"Bytes",
"(",
")",
"[",
"]",
"byte",
"{",
"b",
".",
"m",
".",
"Lock",
"(",
")",
"\n",
"defer",
"b",
".",
"m",
".",
"Unlock",
"(",
")",
"\n",
"return",
"b",
".",
"buf",
"\n",
"}"
] | // Bytes returns a slice of bytes written to the buffer. | [
"Bytes",
"returns",
"a",
"slice",
"of",
"bytes",
"written",
"to",
"the",
"buffer",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/types.go#L197-L201 |
42 | aws/aws-sdk-go | service/opsworks/api.go | SetCpuThreshold | func (s *AutoScalingThresholds) SetCpuThreshold(v float64) *AutoScalingThresholds {
s.CpuThreshold = &v
return s
} | go | func (s *AutoScalingThresholds) SetCpuThreshold(v float64) *AutoScalingThresholds {
s.CpuThreshold = &v
return s
} | [
"func",
"(",
"s",
"*",
"AutoScalingThresholds",
")",
"SetCpuThreshold",
"(",
"v",
"float64",
")",
"*",
"AutoScalingThresholds",
"{",
"s",
".",
"CpuThreshold",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetCpuThreshold sets the CpuThreshold field's value. | [
"SetCpuThreshold",
"sets",
"the",
"CpuThreshold",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L7129-L7132 |
43 | aws/aws-sdk-go | service/opsworks/api.go | SetIgnoreMetricsTime | func (s *AutoScalingThresholds) SetIgnoreMetricsTime(v int64) *AutoScalingThresholds {
s.IgnoreMetricsTime = &v
return s
} | go | func (s *AutoScalingThresholds) SetIgnoreMetricsTime(v int64) *AutoScalingThresholds {
s.IgnoreMetricsTime = &v
return s
} | [
"func",
"(",
"s",
"*",
"AutoScalingThresholds",
")",
"SetIgnoreMetricsTime",
"(",
"v",
"int64",
")",
"*",
"AutoScalingThresholds",
"{",
"s",
".",
"IgnoreMetricsTime",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetIgnoreMetricsTime sets the IgnoreMetricsTime field's value. | [
"SetIgnoreMetricsTime",
"sets",
"the",
"IgnoreMetricsTime",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L7135-L7138 |
44 | aws/aws-sdk-go | service/opsworks/api.go | SetLoadThreshold | func (s *AutoScalingThresholds) SetLoadThreshold(v float64) *AutoScalingThresholds {
s.LoadThreshold = &v
return s
} | go | func (s *AutoScalingThresholds) SetLoadThreshold(v float64) *AutoScalingThresholds {
s.LoadThreshold = &v
return s
} | [
"func",
"(",
"s",
"*",
"AutoScalingThresholds",
")",
"SetLoadThreshold",
"(",
"v",
"float64",
")",
"*",
"AutoScalingThresholds",
"{",
"s",
".",
"LoadThreshold",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetLoadThreshold sets the LoadThreshold field's value. | [
"SetLoadThreshold",
"sets",
"the",
"LoadThreshold",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L7147-L7150 |
45 | aws/aws-sdk-go | service/opsworks/api.go | SetMemoryThreshold | func (s *AutoScalingThresholds) SetMemoryThreshold(v float64) *AutoScalingThresholds {
s.MemoryThreshold = &v
return s
} | go | func (s *AutoScalingThresholds) SetMemoryThreshold(v float64) *AutoScalingThresholds {
s.MemoryThreshold = &v
return s
} | [
"func",
"(",
"s",
"*",
"AutoScalingThresholds",
")",
"SetMemoryThreshold",
"(",
"v",
"float64",
")",
"*",
"AutoScalingThresholds",
"{",
"s",
".",
"MemoryThreshold",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetMemoryThreshold sets the MemoryThreshold field's value. | [
"SetMemoryThreshold",
"sets",
"the",
"MemoryThreshold",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L7153-L7156 |
46 | aws/aws-sdk-go | service/opsworks/api.go | SetThresholdsWaitTime | func (s *AutoScalingThresholds) SetThresholdsWaitTime(v int64) *AutoScalingThresholds {
s.ThresholdsWaitTime = &v
return s
} | go | func (s *AutoScalingThresholds) SetThresholdsWaitTime(v int64) *AutoScalingThresholds {
s.ThresholdsWaitTime = &v
return s
} | [
"func",
"(",
"s",
"*",
"AutoScalingThresholds",
")",
"SetThresholdsWaitTime",
"(",
"v",
"int64",
")",
"*",
"AutoScalingThresholds",
"{",
"s",
".",
"ThresholdsWaitTime",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetThresholdsWaitTime sets the ThresholdsWaitTime field's value. | [
"SetThresholdsWaitTime",
"sets",
"the",
"ThresholdsWaitTime",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L7159-L7162 |
47 | aws/aws-sdk-go | service/opsworks/api.go | SetEbs | func (s *BlockDeviceMapping) SetEbs(v *EbsBlockDevice) *BlockDeviceMapping {
s.Ebs = v
return s
} | go | func (s *BlockDeviceMapping) SetEbs(v *EbsBlockDevice) *BlockDeviceMapping {
s.Ebs = v
return s
} | [
"func",
"(",
"s",
"*",
"BlockDeviceMapping",
")",
"SetEbs",
"(",
"v",
"*",
"EbsBlockDevice",
")",
"*",
"BlockDeviceMapping",
"{",
"s",
".",
"Ebs",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetEbs sets the Ebs field's value. | [
"SetEbs",
"sets",
"the",
"Ebs",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L7203-L7206 |
48 | aws/aws-sdk-go | service/opsworks/api.go | SetBerkshelfVersion | func (s *ChefConfiguration) SetBerkshelfVersion(v string) *ChefConfiguration {
s.BerkshelfVersion = &v
return s
} | go | func (s *ChefConfiguration) SetBerkshelfVersion(v string) *ChefConfiguration {
s.BerkshelfVersion = &v
return s
} | [
"func",
"(",
"s",
"*",
"ChefConfiguration",
")",
"SetBerkshelfVersion",
"(",
"v",
"string",
")",
"*",
"ChefConfiguration",
"{",
"s",
".",
"BerkshelfVersion",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetBerkshelfVersion sets the BerkshelfVersion field's value. | [
"SetBerkshelfVersion",
"sets",
"the",
"BerkshelfVersion",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L7242-L7245 |
49 | aws/aws-sdk-go | service/opsworks/api.go | SetManageBerkshelf | func (s *ChefConfiguration) SetManageBerkshelf(v bool) *ChefConfiguration {
s.ManageBerkshelf = &v
return s
} | go | func (s *ChefConfiguration) SetManageBerkshelf(v bool) *ChefConfiguration {
s.ManageBerkshelf = &v
return s
} | [
"func",
"(",
"s",
"*",
"ChefConfiguration",
")",
"SetManageBerkshelf",
"(",
"v",
"bool",
")",
"*",
"ChefConfiguration",
"{",
"s",
".",
"ManageBerkshelf",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetManageBerkshelf sets the ManageBerkshelf field's value. | [
"SetManageBerkshelf",
"sets",
"the",
"ManageBerkshelf",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L7248-L7251 |
50 | aws/aws-sdk-go | service/opsworks/api.go | SetCloneAppIds | func (s *CloneStackInput) SetCloneAppIds(v []*string) *CloneStackInput {
s.CloneAppIds = v
return s
} | go | func (s *CloneStackInput) SetCloneAppIds(v []*string) *CloneStackInput {
s.CloneAppIds = v
return s
} | [
"func",
"(",
"s",
"*",
"CloneStackInput",
")",
"SetCloneAppIds",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"CloneStackInput",
"{",
"s",
".",
"CloneAppIds",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetCloneAppIds sets the CloneAppIds field's value. | [
"SetCloneAppIds",
"sets",
"the",
"CloneAppIds",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L7532-L7535 |
51 | aws/aws-sdk-go | service/opsworks/api.go | SetClonePermissions | func (s *CloneStackInput) SetClonePermissions(v bool) *CloneStackInput {
s.ClonePermissions = &v
return s
} | go | func (s *CloneStackInput) SetClonePermissions(v bool) *CloneStackInput {
s.ClonePermissions = &v
return s
} | [
"func",
"(",
"s",
"*",
"CloneStackInput",
")",
"SetClonePermissions",
"(",
"v",
"bool",
")",
"*",
"CloneStackInput",
"{",
"s",
".",
"ClonePermissions",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetClonePermissions sets the ClonePermissions field's value. | [
"SetClonePermissions",
"sets",
"the",
"ClonePermissions",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L7538-L7541 |
52 | aws/aws-sdk-go | service/opsworks/api.go | SetSourceStackId | func (s *CloneStackInput) SetSourceStackId(v string) *CloneStackInput {
s.SourceStackId = &v
return s
} | go | func (s *CloneStackInput) SetSourceStackId(v string) *CloneStackInput {
s.SourceStackId = &v
return s
} | [
"func",
"(",
"s",
"*",
"CloneStackInput",
")",
"SetSourceStackId",
"(",
"v",
"string",
")",
"*",
"CloneStackInput",
"{",
"s",
".",
"SourceStackId",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetSourceStackId sets the SourceStackId field's value. | [
"SetSourceStackId",
"sets",
"the",
"SourceStackId",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L7622-L7625 |
53 | aws/aws-sdk-go | service/opsworks/api.go | SetBatchCount | func (s *CloudWatchLogsLogStream) SetBatchCount(v int64) *CloudWatchLogsLogStream {
s.BatchCount = &v
return s
} | go | func (s *CloudWatchLogsLogStream) SetBatchCount(v int64) *CloudWatchLogsLogStream {
s.BatchCount = &v
return s
} | [
"func",
"(",
"s",
"*",
"CloudWatchLogsLogStream",
")",
"SetBatchCount",
"(",
"v",
"int64",
")",
"*",
"CloudWatchLogsLogStream",
"{",
"s",
".",
"BatchCount",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetBatchCount sets the BatchCount field's value. | [
"SetBatchCount",
"sets",
"the",
"BatchCount",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L7781-L7784 |
54 | aws/aws-sdk-go | service/opsworks/api.go | SetBufferDuration | func (s *CloudWatchLogsLogStream) SetBufferDuration(v int64) *CloudWatchLogsLogStream {
s.BufferDuration = &v
return s
} | go | func (s *CloudWatchLogsLogStream) SetBufferDuration(v int64) *CloudWatchLogsLogStream {
s.BufferDuration = &v
return s
} | [
"func",
"(",
"s",
"*",
"CloudWatchLogsLogStream",
")",
"SetBufferDuration",
"(",
"v",
"int64",
")",
"*",
"CloudWatchLogsLogStream",
"{",
"s",
".",
"BufferDuration",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetBufferDuration sets the BufferDuration field's value. | [
"SetBufferDuration",
"sets",
"the",
"BufferDuration",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L7793-L7796 |
55 | aws/aws-sdk-go | service/opsworks/api.go | SetDatetimeFormat | func (s *CloudWatchLogsLogStream) SetDatetimeFormat(v string) *CloudWatchLogsLogStream {
s.DatetimeFormat = &v
return s
} | go | func (s *CloudWatchLogsLogStream) SetDatetimeFormat(v string) *CloudWatchLogsLogStream {
s.DatetimeFormat = &v
return s
} | [
"func",
"(",
"s",
"*",
"CloudWatchLogsLogStream",
")",
"SetDatetimeFormat",
"(",
"v",
"string",
")",
"*",
"CloudWatchLogsLogStream",
"{",
"s",
".",
"DatetimeFormat",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetDatetimeFormat sets the DatetimeFormat field's value. | [
"SetDatetimeFormat",
"sets",
"the",
"DatetimeFormat",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L7799-L7802 |
56 | aws/aws-sdk-go | service/opsworks/api.go | SetFileFingerprintLines | func (s *CloudWatchLogsLogStream) SetFileFingerprintLines(v string) *CloudWatchLogsLogStream {
s.FileFingerprintLines = &v
return s
} | go | func (s *CloudWatchLogsLogStream) SetFileFingerprintLines(v string) *CloudWatchLogsLogStream {
s.FileFingerprintLines = &v
return s
} | [
"func",
"(",
"s",
"*",
"CloudWatchLogsLogStream",
")",
"SetFileFingerprintLines",
"(",
"v",
"string",
")",
"*",
"CloudWatchLogsLogStream",
"{",
"s",
".",
"FileFingerprintLines",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetFileFingerprintLines sets the FileFingerprintLines field's value. | [
"SetFileFingerprintLines",
"sets",
"the",
"FileFingerprintLines",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L7817-L7820 |
57 | aws/aws-sdk-go | service/opsworks/api.go | SetInitialPosition | func (s *CloudWatchLogsLogStream) SetInitialPosition(v string) *CloudWatchLogsLogStream {
s.InitialPosition = &v
return s
} | go | func (s *CloudWatchLogsLogStream) SetInitialPosition(v string) *CloudWatchLogsLogStream {
s.InitialPosition = &v
return s
} | [
"func",
"(",
"s",
"*",
"CloudWatchLogsLogStream",
")",
"SetInitialPosition",
"(",
"v",
"string",
")",
"*",
"CloudWatchLogsLogStream",
"{",
"s",
".",
"InitialPosition",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetInitialPosition sets the InitialPosition field's value. | [
"SetInitialPosition",
"sets",
"the",
"InitialPosition",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L7823-L7826 |
58 | aws/aws-sdk-go | service/opsworks/api.go | SetMultiLineStartPattern | func (s *CloudWatchLogsLogStream) SetMultiLineStartPattern(v string) *CloudWatchLogsLogStream {
s.MultiLineStartPattern = &v
return s
} | go | func (s *CloudWatchLogsLogStream) SetMultiLineStartPattern(v string) *CloudWatchLogsLogStream {
s.MultiLineStartPattern = &v
return s
} | [
"func",
"(",
"s",
"*",
"CloudWatchLogsLogStream",
")",
"SetMultiLineStartPattern",
"(",
"v",
"string",
")",
"*",
"CloudWatchLogsLogStream",
"{",
"s",
".",
"MultiLineStartPattern",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetMultiLineStartPattern sets the MultiLineStartPattern field's value. | [
"SetMultiLineStartPattern",
"sets",
"the",
"MultiLineStartPattern",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L7835-L7838 |
59 | aws/aws-sdk-go | service/opsworks/api.go | SetAcknowledgedAt | func (s *Command) SetAcknowledgedAt(v string) *Command {
s.AcknowledgedAt = &v
return s
} | go | func (s *Command) SetAcknowledgedAt(v string) *Command {
s.AcknowledgedAt = &v
return s
} | [
"func",
"(",
"s",
"*",
"Command",
")",
"SetAcknowledgedAt",
"(",
"v",
"string",
")",
"*",
"Command",
"{",
"s",
".",
"AcknowledgedAt",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetAcknowledgedAt sets the AcknowledgedAt field's value. | [
"SetAcknowledgedAt",
"sets",
"the",
"AcknowledgedAt",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L7924-L7927 |
60 | aws/aws-sdk-go | service/opsworks/api.go | SetDeleteElasticIp | func (s *DeleteInstanceInput) SetDeleteElasticIp(v bool) *DeleteInstanceInput {
s.DeleteElasticIp = &v
return s
} | go | func (s *DeleteInstanceInput) SetDeleteElasticIp(v bool) *DeleteInstanceInput {
s.DeleteElasticIp = &v
return s
} | [
"func",
"(",
"s",
"*",
"DeleteInstanceInput",
")",
"SetDeleteElasticIp",
"(",
"v",
"bool",
")",
"*",
"DeleteInstanceInput",
"{",
"s",
".",
"DeleteElasticIp",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetDeleteElasticIp sets the DeleteElasticIp field's value. | [
"SetDeleteElasticIp",
"sets",
"the",
"DeleteElasticIp",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L9529-L9532 |
61 | aws/aws-sdk-go | service/opsworks/api.go | SetDeleteVolumes | func (s *DeleteInstanceInput) SetDeleteVolumes(v bool) *DeleteInstanceInput {
s.DeleteVolumes = &v
return s
} | go | func (s *DeleteInstanceInput) SetDeleteVolumes(v bool) *DeleteInstanceInput {
s.DeleteVolumes = &v
return s
} | [
"func",
"(",
"s",
"*",
"DeleteInstanceInput",
")",
"SetDeleteVolumes",
"(",
"v",
"bool",
")",
"*",
"DeleteInstanceInput",
"{",
"s",
".",
"DeleteVolumes",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetDeleteVolumes sets the DeleteVolumes field's value. | [
"SetDeleteVolumes",
"sets",
"the",
"DeleteVolumes",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L9535-L9538 |
62 | aws/aws-sdk-go | service/opsworks/api.go | SetAgentVersions | func (s *DescribeAgentVersionsOutput) SetAgentVersions(v []*AgentVersion) *DescribeAgentVersionsOutput {
s.AgentVersions = v
return s
} | go | func (s *DescribeAgentVersionsOutput) SetAgentVersions(v []*AgentVersion) *DescribeAgentVersionsOutput {
s.AgentVersions = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeAgentVersionsOutput",
")",
"SetAgentVersions",
"(",
"v",
"[",
"]",
"*",
"AgentVersion",
")",
"*",
"DescribeAgentVersionsOutput",
"{",
"s",
".",
"AgentVersions",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetAgentVersions sets the AgentVersions field's value. | [
"SetAgentVersions",
"sets",
"the",
"AgentVersions",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L10269-L10272 |
63 | aws/aws-sdk-go | service/opsworks/api.go | SetCommandIds | func (s *DescribeCommandsInput) SetCommandIds(v []*string) *DescribeCommandsInput {
s.CommandIds = v
return s
} | go | func (s *DescribeCommandsInput) SetCommandIds(v []*string) *DescribeCommandsInput {
s.CommandIds = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeCommandsInput",
")",
"SetCommandIds",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"DescribeCommandsInput",
"{",
"s",
".",
"CommandIds",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetCommandIds sets the CommandIds field's value. | [
"SetCommandIds",
"sets",
"the",
"CommandIds",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L10361-L10364 |
64 | aws/aws-sdk-go | service/opsworks/api.go | SetEcsClusterArns | func (s *DescribeEcsClustersInput) SetEcsClusterArns(v []*string) *DescribeEcsClustersInput {
s.EcsClusterArns = v
return s
} | go | func (s *DescribeEcsClustersInput) SetEcsClusterArns(v []*string) *DescribeEcsClustersInput {
s.EcsClusterArns = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeEcsClustersInput",
")",
"SetEcsClusterArns",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"DescribeEcsClustersInput",
"{",
"s",
".",
"EcsClusterArns",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetEcsClusterArns sets the EcsClusterArns field's value. | [
"SetEcsClusterArns",
"sets",
"the",
"EcsClusterArns",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L10507-L10510 |
65 | aws/aws-sdk-go | service/opsworks/api.go | SetEcsClusters | func (s *DescribeEcsClustersOutput) SetEcsClusters(v []*EcsCluster) *DescribeEcsClustersOutput {
s.EcsClusters = v
return s
} | go | func (s *DescribeEcsClustersOutput) SetEcsClusters(v []*EcsCluster) *DescribeEcsClustersOutput {
s.EcsClusters = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeEcsClustersOutput",
")",
"SetEcsClusters",
"(",
"v",
"[",
"]",
"*",
"EcsCluster",
")",
"*",
"DescribeEcsClustersOutput",
"{",
"s",
".",
"EcsClusters",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetEcsClusters sets the EcsClusters field's value. | [
"SetEcsClusters",
"sets",
"the",
"EcsClusters",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L10555-L10558 |
66 | aws/aws-sdk-go | service/opsworks/api.go | SetIps | func (s *DescribeElasticIpsInput) SetIps(v []*string) *DescribeElasticIpsInput {
s.Ips = v
return s
} | go | func (s *DescribeElasticIpsInput) SetIps(v []*string) *DescribeElasticIpsInput {
s.Ips = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeElasticIpsInput",
")",
"SetIps",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"DescribeElasticIpsInput",
"{",
"s",
".",
"Ips",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetIps sets the Ips field's value. | [
"SetIps",
"sets",
"the",
"Ips",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L10600-L10603 |
67 | aws/aws-sdk-go | service/opsworks/api.go | SetElasticIps | func (s *DescribeElasticIpsOutput) SetElasticIps(v []*ElasticIp) *DescribeElasticIpsOutput {
s.ElasticIps = v
return s
} | go | func (s *DescribeElasticIpsOutput) SetElasticIps(v []*ElasticIp) *DescribeElasticIpsOutput {
s.ElasticIps = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeElasticIpsOutput",
")",
"SetElasticIps",
"(",
"v",
"[",
"]",
"*",
"ElasticIp",
")",
"*",
"DescribeElasticIpsOutput",
"{",
"s",
".",
"ElasticIps",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetElasticIps sets the ElasticIps field's value. | [
"SetElasticIps",
"sets",
"the",
"ElasticIps",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L10630-L10633 |
68 | aws/aws-sdk-go | service/opsworks/api.go | SetElasticLoadBalancers | func (s *DescribeElasticLoadBalancersOutput) SetElasticLoadBalancers(v []*ElasticLoadBalancer) *DescribeElasticLoadBalancersOutput {
s.ElasticLoadBalancers = v
return s
} | go | func (s *DescribeElasticLoadBalancersOutput) SetElasticLoadBalancers(v []*ElasticLoadBalancer) *DescribeElasticLoadBalancersOutput {
s.ElasticLoadBalancers = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeElasticLoadBalancersOutput",
")",
"SetElasticLoadBalancers",
"(",
"v",
"[",
"]",
"*",
"ElasticLoadBalancer",
")",
"*",
"DescribeElasticLoadBalancersOutput",
"{",
"s",
".",
"ElasticLoadBalancers",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetElasticLoadBalancers sets the ElasticLoadBalancers field's value. | [
"SetElasticLoadBalancers",
"sets",
"the",
"ElasticLoadBalancers",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L10688-L10691 |
69 | aws/aws-sdk-go | service/opsworks/api.go | SetLoadBasedAutoScalingConfigurations | func (s *DescribeLoadBasedAutoScalingOutput) SetLoadBasedAutoScalingConfigurations(v []*LoadBasedAutoScalingConfiguration) *DescribeLoadBasedAutoScalingOutput {
s.LoadBasedAutoScalingConfigurations = v
return s
} | go | func (s *DescribeLoadBasedAutoScalingOutput) SetLoadBasedAutoScalingConfigurations(v []*LoadBasedAutoScalingConfiguration) *DescribeLoadBasedAutoScalingOutput {
s.LoadBasedAutoScalingConfigurations = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeLoadBasedAutoScalingOutput",
")",
"SetLoadBasedAutoScalingConfigurations",
"(",
"v",
"[",
"]",
"*",
"LoadBasedAutoScalingConfiguration",
")",
"*",
"DescribeLoadBasedAutoScalingOutput",
"{",
"s",
".",
"LoadBasedAutoScalingConfigurations",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetLoadBasedAutoScalingConfigurations sets the LoadBasedAutoScalingConfigurations field's value. | [
"SetLoadBasedAutoScalingConfigurations",
"sets",
"the",
"LoadBasedAutoScalingConfigurations",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L10878-L10881 |
70 | aws/aws-sdk-go | service/opsworks/api.go | SetUserProfile | func (s *DescribeMyUserProfileOutput) SetUserProfile(v *SelfUserProfile) *DescribeMyUserProfileOutput {
s.UserProfile = v
return s
} | go | func (s *DescribeMyUserProfileOutput) SetUserProfile(v *SelfUserProfile) *DescribeMyUserProfileOutput {
s.UserProfile = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeMyUserProfileOutput",
")",
"SetUserProfile",
"(",
"v",
"*",
"SelfUserProfile",
")",
"*",
"DescribeMyUserProfileOutput",
"{",
"s",
".",
"UserProfile",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetUserProfile sets the UserProfile field's value. | [
"SetUserProfile",
"sets",
"the",
"UserProfile",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L10916-L10919 |
71 | aws/aws-sdk-go | service/opsworks/api.go | SetOperatingSystems | func (s *DescribeOperatingSystemsOutput) SetOperatingSystems(v []*OperatingSystem) *DescribeOperatingSystemsOutput {
s.OperatingSystems = v
return s
} | go | func (s *DescribeOperatingSystemsOutput) SetOperatingSystems(v []*OperatingSystem) *DescribeOperatingSystemsOutput {
s.OperatingSystems = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeOperatingSystemsOutput",
")",
"SetOperatingSystems",
"(",
"v",
"[",
"]",
"*",
"OperatingSystem",
")",
"*",
"DescribeOperatingSystemsOutput",
"{",
"s",
".",
"OperatingSystems",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetOperatingSystems sets the OperatingSystems field's value. | [
"SetOperatingSystems",
"sets",
"the",
"OperatingSystems",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L10954-L10957 |
72 | aws/aws-sdk-go | service/opsworks/api.go | SetRaidArrayIds | func (s *DescribeRaidArraysInput) SetRaidArrayIds(v []*string) *DescribeRaidArraysInput {
s.RaidArrayIds = v
return s
} | go | func (s *DescribeRaidArraysInput) SetRaidArrayIds(v []*string) *DescribeRaidArraysInput {
s.RaidArrayIds = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeRaidArraysInput",
")",
"SetRaidArrayIds",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"DescribeRaidArraysInput",
"{",
"s",
".",
"RaidArrayIds",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetRaidArrayIds sets the RaidArrayIds field's value. | [
"SetRaidArrayIds",
"sets",
"the",
"RaidArrayIds",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L11059-L11062 |
73 | aws/aws-sdk-go | service/opsworks/api.go | SetRaidArrays | func (s *DescribeRaidArraysOutput) SetRaidArrays(v []*RaidArray) *DescribeRaidArraysOutput {
s.RaidArrays = v
return s
} | go | func (s *DescribeRaidArraysOutput) SetRaidArrays(v []*RaidArray) *DescribeRaidArraysOutput {
s.RaidArrays = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeRaidArraysOutput",
")",
"SetRaidArrays",
"(",
"v",
"[",
"]",
"*",
"RaidArray",
")",
"*",
"DescribeRaidArraysOutput",
"{",
"s",
".",
"RaidArrays",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetRaidArrays sets the RaidArrays field's value. | [
"SetRaidArrays",
"sets",
"the",
"RaidArrays",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L11089-L11092 |
74 | aws/aws-sdk-go | service/opsworks/api.go | SetRdsDbInstanceArns | func (s *DescribeRdsDbInstancesInput) SetRdsDbInstanceArns(v []*string) *DescribeRdsDbInstancesInput {
s.RdsDbInstanceArns = v
return s
} | go | func (s *DescribeRdsDbInstancesInput) SetRdsDbInstanceArns(v []*string) *DescribeRdsDbInstancesInput {
s.RdsDbInstanceArns = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeRdsDbInstancesInput",
")",
"SetRdsDbInstanceArns",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"DescribeRdsDbInstancesInput",
"{",
"s",
".",
"RdsDbInstanceArns",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetRdsDbInstanceArns sets the RdsDbInstanceArns field's value. | [
"SetRdsDbInstanceArns",
"sets",
"the",
"RdsDbInstanceArns",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L11131-L11134 |
75 | aws/aws-sdk-go | service/opsworks/api.go | SetRdsDbInstances | func (s *DescribeRdsDbInstancesOutput) SetRdsDbInstances(v []*RdsDbInstance) *DescribeRdsDbInstancesOutput {
s.RdsDbInstances = v
return s
} | go | func (s *DescribeRdsDbInstancesOutput) SetRdsDbInstances(v []*RdsDbInstance) *DescribeRdsDbInstancesOutput {
s.RdsDbInstances = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeRdsDbInstancesOutput",
")",
"SetRdsDbInstances",
"(",
"v",
"[",
"]",
"*",
"RdsDbInstance",
")",
"*",
"DescribeRdsDbInstancesOutput",
"{",
"s",
".",
"RdsDbInstances",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetRdsDbInstances sets the RdsDbInstances field's value. | [
"SetRdsDbInstances",
"sets",
"the",
"RdsDbInstances",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L11161-L11164 |
76 | aws/aws-sdk-go | service/opsworks/api.go | SetServiceErrorIds | func (s *DescribeServiceErrorsInput) SetServiceErrorIds(v []*string) *DescribeServiceErrorsInput {
s.ServiceErrorIds = v
return s
} | go | func (s *DescribeServiceErrorsInput) SetServiceErrorIds(v []*string) *DescribeServiceErrorsInput {
s.ServiceErrorIds = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeServiceErrorsInput",
")",
"SetServiceErrorIds",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"DescribeServiceErrorsInput",
"{",
"s",
".",
"ServiceErrorIds",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetServiceErrorIds sets the ServiceErrorIds field's value. | [
"SetServiceErrorIds",
"sets",
"the",
"ServiceErrorIds",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L11200-L11203 |
77 | aws/aws-sdk-go | service/opsworks/api.go | SetServiceErrors | func (s *DescribeServiceErrorsOutput) SetServiceErrors(v []*ServiceError) *DescribeServiceErrorsOutput {
s.ServiceErrors = v
return s
} | go | func (s *DescribeServiceErrorsOutput) SetServiceErrors(v []*ServiceError) *DescribeServiceErrorsOutput {
s.ServiceErrors = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeServiceErrorsOutput",
")",
"SetServiceErrors",
"(",
"v",
"[",
"]",
"*",
"ServiceError",
")",
"*",
"DescribeServiceErrorsOutput",
"{",
"s",
".",
"ServiceErrors",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetServiceErrors sets the ServiceErrors field's value. | [
"SetServiceErrors",
"sets",
"the",
"ServiceErrors",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L11230-L11233 |
78 | aws/aws-sdk-go | service/opsworks/api.go | SetAgentInstallerUrl | func (s *DescribeStackProvisioningParametersOutput) SetAgentInstallerUrl(v string) *DescribeStackProvisioningParametersOutput {
s.AgentInstallerUrl = &v
return s
} | go | func (s *DescribeStackProvisioningParametersOutput) SetAgentInstallerUrl(v string) *DescribeStackProvisioningParametersOutput {
s.AgentInstallerUrl = &v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeStackProvisioningParametersOutput",
")",
"SetAgentInstallerUrl",
"(",
"v",
"string",
")",
"*",
"DescribeStackProvisioningParametersOutput",
"{",
"s",
".",
"AgentInstallerUrl",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetAgentInstallerUrl sets the AgentInstallerUrl field's value. | [
"SetAgentInstallerUrl",
"sets",
"the",
"AgentInstallerUrl",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L11295-L11298 |
79 | aws/aws-sdk-go | service/opsworks/api.go | SetStackSummary | func (s *DescribeStackSummaryOutput) SetStackSummary(v *StackSummary) *DescribeStackSummaryOutput {
s.StackSummary = v
return s
} | go | func (s *DescribeStackSummaryOutput) SetStackSummary(v *StackSummary) *DescribeStackSummaryOutput {
s.StackSummary = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeStackSummaryOutput",
")",
"SetStackSummary",
"(",
"v",
"*",
"StackSummary",
")",
"*",
"DescribeStackSummaryOutput",
"{",
"s",
".",
"StackSummary",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetStackSummary sets the StackSummary field's value. | [
"SetStackSummary",
"sets",
"the",
"StackSummary",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L11363-L11366 |
80 | aws/aws-sdk-go | service/opsworks/api.go | SetStackIds | func (s *DescribeStacksInput) SetStackIds(v []*string) *DescribeStacksInput {
s.StackIds = v
return s
} | go | func (s *DescribeStacksInput) SetStackIds(v []*string) *DescribeStacksInput {
s.StackIds = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeStacksInput",
")",
"SetStackIds",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"DescribeStacksInput",
"{",
"s",
".",
"StackIds",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetStackIds sets the StackIds field's value. | [
"SetStackIds",
"sets",
"the",
"StackIds",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L11387-L11390 |
81 | aws/aws-sdk-go | service/opsworks/api.go | SetStacks | func (s *DescribeStacksOutput) SetStacks(v []*Stack) *DescribeStacksOutput {
s.Stacks = v
return s
} | go | func (s *DescribeStacksOutput) SetStacks(v []*Stack) *DescribeStacksOutput {
s.Stacks = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeStacksOutput",
")",
"SetStacks",
"(",
"v",
"[",
"]",
"*",
"Stack",
")",
"*",
"DescribeStacksOutput",
"{",
"s",
".",
"Stacks",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetStacks sets the Stacks field's value. | [
"SetStacks",
"sets",
"the",
"Stacks",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L11411-L11414 |
82 | aws/aws-sdk-go | service/opsworks/api.go | SetTimeBasedAutoScalingConfigurations | func (s *DescribeTimeBasedAutoScalingOutput) SetTimeBasedAutoScalingConfigurations(v []*TimeBasedAutoScalingConfiguration) *DescribeTimeBasedAutoScalingOutput {
s.TimeBasedAutoScalingConfigurations = v
return s
} | go | func (s *DescribeTimeBasedAutoScalingOutput) SetTimeBasedAutoScalingConfigurations(v []*TimeBasedAutoScalingConfiguration) *DescribeTimeBasedAutoScalingOutput {
s.TimeBasedAutoScalingConfigurations = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeTimeBasedAutoScalingOutput",
")",
"SetTimeBasedAutoScalingConfigurations",
"(",
"v",
"[",
"]",
"*",
"TimeBasedAutoScalingConfiguration",
")",
"*",
"DescribeTimeBasedAutoScalingOutput",
"{",
"s",
".",
"TimeBasedAutoScalingConfigurations",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetTimeBasedAutoScalingConfigurations sets the TimeBasedAutoScalingConfigurations field's value. | [
"SetTimeBasedAutoScalingConfigurations",
"sets",
"the",
"TimeBasedAutoScalingConfigurations",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L11474-L11477 |
83 | aws/aws-sdk-go | service/opsworks/api.go | SetIamUserArns | func (s *DescribeUserProfilesInput) SetIamUserArns(v []*string) *DescribeUserProfilesInput {
s.IamUserArns = v
return s
} | go | func (s *DescribeUserProfilesInput) SetIamUserArns(v []*string) *DescribeUserProfilesInput {
s.IamUserArns = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeUserProfilesInput",
")",
"SetIamUserArns",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"DescribeUserProfilesInput",
"{",
"s",
".",
"IamUserArns",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetIamUserArns sets the IamUserArns field's value. | [
"SetIamUserArns",
"sets",
"the",
"IamUserArns",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L11497-L11500 |
84 | aws/aws-sdk-go | service/opsworks/api.go | SetVolumeIds | func (s *DescribeVolumesInput) SetVolumeIds(v []*string) *DescribeVolumesInput {
s.VolumeIds = v
return s
} | go | func (s *DescribeVolumesInput) SetVolumeIds(v []*string) *DescribeVolumesInput {
s.VolumeIds = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeVolumesInput",
")",
"SetVolumeIds",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"DescribeVolumesInput",
"{",
"s",
".",
"VolumeIds",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetVolumeIds sets the VolumeIds field's value. | [
"SetVolumeIds",
"sets",
"the",
"VolumeIds",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L11575-L11578 |
85 | aws/aws-sdk-go | service/opsworks/api.go | SetEcsClusterName | func (s *EcsCluster) SetEcsClusterName(v string) *EcsCluster {
s.EcsClusterName = &v
return s
} | go | func (s *EcsCluster) SetEcsClusterName(v string) *EcsCluster {
s.EcsClusterName = &v
return s
} | [
"func",
"(",
"s",
"*",
"EcsCluster",
")",
"SetEcsClusterName",
"(",
"v",
"string",
")",
"*",
"EcsCluster",
"{",
"s",
".",
"EcsClusterName",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetEcsClusterName sets the EcsClusterName field's value. | [
"SetEcsClusterName",
"sets",
"the",
"EcsClusterName",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L11827-L11830 |
86 | aws/aws-sdk-go | service/opsworks/api.go | SetEc2InstanceIds | func (s *ElasticLoadBalancer) SetEc2InstanceIds(v []*string) *ElasticLoadBalancer {
s.Ec2InstanceIds = v
return s
} | go | func (s *ElasticLoadBalancer) SetEc2InstanceIds(v []*string) *ElasticLoadBalancer {
s.Ec2InstanceIds = v
return s
} | [
"func",
"(",
"s",
"*",
"ElasticLoadBalancer",
")",
"SetEc2InstanceIds",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"ElasticLoadBalancer",
"{",
"s",
".",
"Ec2InstanceIds",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetEc2InstanceIds sets the Ec2InstanceIds field's value. | [
"SetEc2InstanceIds",
"sets",
"the",
"Ec2InstanceIds",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L11960-L11963 |
87 | aws/aws-sdk-go | service/opsworks/api.go | SetSecure | func (s *EnvironmentVariable) SetSecure(v bool) *EnvironmentVariable {
s.Secure = &v
return s
} | go | func (s *EnvironmentVariable) SetSecure(v bool) *EnvironmentVariable {
s.Secure = &v
return s
} | [
"func",
"(",
"s",
"*",
"EnvironmentVariable",
")",
"SetSecure",
"(",
"v",
"bool",
")",
"*",
"EnvironmentVariable",
"{",
"s",
".",
"Secure",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetSecure sets the Secure field's value. | [
"SetSecure",
"sets",
"the",
"Secure",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L12060-L12063 |
88 | aws/aws-sdk-go | service/opsworks/api.go | SetTemporaryCredential | func (s *GrantAccessOutput) SetTemporaryCredential(v *TemporaryCredential) *GrantAccessOutput {
s.TemporaryCredential = v
return s
} | go | func (s *GrantAccessOutput) SetTemporaryCredential(v *TemporaryCredential) *GrantAccessOutput {
s.TemporaryCredential = v
return s
} | [
"func",
"(",
"s",
"*",
"GrantAccessOutput",
")",
"SetTemporaryCredential",
"(",
"v",
"*",
"TemporaryCredential",
")",
"*",
"GrantAccessOutput",
"{",
"s",
".",
"TemporaryCredential",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetTemporaryCredential sets the TemporaryCredential field's value. | [
"SetTemporaryCredential",
"sets",
"the",
"TemporaryCredential",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L12215-L12218 |
89 | aws/aws-sdk-go | service/opsworks/api.go | SetEcsContainerInstanceArn | func (s *Instance) SetEcsContainerInstanceArn(v string) *Instance {
s.EcsContainerInstanceArn = &v
return s
} | go | func (s *Instance) SetEcsContainerInstanceArn(v string) *Instance {
s.EcsContainerInstanceArn = &v
return s
} | [
"func",
"(",
"s",
"*",
"Instance",
")",
"SetEcsContainerInstanceArn",
"(",
"v",
"string",
")",
"*",
"Instance",
"{",
"s",
".",
"EcsContainerInstanceArn",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetEcsContainerInstanceArn sets the EcsContainerInstanceArn field's value. | [
"SetEcsContainerInstanceArn",
"sets",
"the",
"EcsContainerInstanceArn",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L12468-L12471 |
90 | aws/aws-sdk-go | service/opsworks/api.go | SetInfrastructureClass | func (s *Instance) SetInfrastructureClass(v string) *Instance {
s.InfrastructureClass = &v
return s
} | go | func (s *Instance) SetInfrastructureClass(v string) *Instance {
s.InfrastructureClass = &v
return s
} | [
"func",
"(",
"s",
"*",
"Instance",
")",
"SetInfrastructureClass",
"(",
"v",
"string",
")",
"*",
"Instance",
"{",
"s",
".",
"InfrastructureClass",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetInfrastructureClass sets the InfrastructureClass field's value. | [
"SetInfrastructureClass",
"sets",
"the",
"InfrastructureClass",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L12486-L12489 |
91 | aws/aws-sdk-go | service/opsworks/api.go | SetLastServiceErrorId | func (s *Instance) SetLastServiceErrorId(v string) *Instance {
s.LastServiceErrorId = &v
return s
} | go | func (s *Instance) SetLastServiceErrorId(v string) *Instance {
s.LastServiceErrorId = &v
return s
} | [
"func",
"(",
"s",
"*",
"Instance",
")",
"SetLastServiceErrorId",
"(",
"v",
"string",
")",
"*",
"Instance",
"{",
"s",
".",
"LastServiceErrorId",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetLastServiceErrorId sets the LastServiceErrorId field's value. | [
"SetLastServiceErrorId",
"sets",
"the",
"LastServiceErrorId",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L12516-L12519 |
92 | aws/aws-sdk-go | service/opsworks/api.go | SetPrivateDns | func (s *Instance) SetPrivateDns(v string) *Instance {
s.PrivateDns = &v
return s
} | go | func (s *Instance) SetPrivateDns(v string) *Instance {
s.PrivateDns = &v
return s
} | [
"func",
"(",
"s",
"*",
"Instance",
")",
"SetPrivateDns",
"(",
"v",
"string",
")",
"*",
"Instance",
"{",
"s",
".",
"PrivateDns",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetPrivateDns sets the PrivateDns field's value. | [
"SetPrivateDns",
"sets",
"the",
"PrivateDns",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L12540-L12543 |
93 | aws/aws-sdk-go | service/opsworks/api.go | SetPublicDns | func (s *Instance) SetPublicDns(v string) *Instance {
s.PublicDns = &v
return s
} | go | func (s *Instance) SetPublicDns(v string) *Instance {
s.PublicDns = &v
return s
} | [
"func",
"(",
"s",
"*",
"Instance",
")",
"SetPublicDns",
"(",
"v",
"string",
")",
"*",
"Instance",
"{",
"s",
".",
"PublicDns",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetPublicDns sets the PublicDns field's value. | [
"SetPublicDns",
"sets",
"the",
"PublicDns",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L12552-L12555 |
94 | aws/aws-sdk-go | service/opsworks/api.go | SetRegisteredBy | func (s *Instance) SetRegisteredBy(v string) *Instance {
s.RegisteredBy = &v
return s
} | go | func (s *Instance) SetRegisteredBy(v string) *Instance {
s.RegisteredBy = &v
return s
} | [
"func",
"(",
"s",
"*",
"Instance",
")",
"SetRegisteredBy",
"(",
"v",
"string",
")",
"*",
"Instance",
"{",
"s",
".",
"RegisteredBy",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetRegisteredBy sets the RegisteredBy field's value. | [
"SetRegisteredBy",
"sets",
"the",
"RegisteredBy",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L12564-L12567 |
95 | aws/aws-sdk-go | service/opsworks/api.go | SetReportedAgentVersion | func (s *Instance) SetReportedAgentVersion(v string) *Instance {
s.ReportedAgentVersion = &v
return s
} | go | func (s *Instance) SetReportedAgentVersion(v string) *Instance {
s.ReportedAgentVersion = &v
return s
} | [
"func",
"(",
"s",
"*",
"Instance",
")",
"SetReportedAgentVersion",
"(",
"v",
"string",
")",
"*",
"Instance",
"{",
"s",
".",
"ReportedAgentVersion",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetReportedAgentVersion sets the ReportedAgentVersion field's value. | [
"SetReportedAgentVersion",
"sets",
"the",
"ReportedAgentVersion",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L12570-L12573 |
96 | aws/aws-sdk-go | service/opsworks/api.go | SetReportedOs | func (s *Instance) SetReportedOs(v *ReportedOs) *Instance {
s.ReportedOs = v
return s
} | go | func (s *Instance) SetReportedOs(v *ReportedOs) *Instance {
s.ReportedOs = v
return s
} | [
"func",
"(",
"s",
"*",
"Instance",
")",
"SetReportedOs",
"(",
"v",
"*",
"ReportedOs",
")",
"*",
"Instance",
"{",
"s",
".",
"ReportedOs",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetReportedOs sets the ReportedOs field's value. | [
"SetReportedOs",
"sets",
"the",
"ReportedOs",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L12576-L12579 |
97 | aws/aws-sdk-go | service/opsworks/api.go | SetRootDeviceVolumeId | func (s *Instance) SetRootDeviceVolumeId(v string) *Instance {
s.RootDeviceVolumeId = &v
return s
} | go | func (s *Instance) SetRootDeviceVolumeId(v string) *Instance {
s.RootDeviceVolumeId = &v
return s
} | [
"func",
"(",
"s",
"*",
"Instance",
")",
"SetRootDeviceVolumeId",
"(",
"v",
"string",
")",
"*",
"Instance",
"{",
"s",
".",
"RootDeviceVolumeId",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetRootDeviceVolumeId sets the RootDeviceVolumeId field's value. | [
"SetRootDeviceVolumeId",
"sets",
"the",
"RootDeviceVolumeId",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L12588-L12591 |
98 | aws/aws-sdk-go | service/opsworks/api.go | SetSshHostDsaKeyFingerprint | func (s *Instance) SetSshHostDsaKeyFingerprint(v string) *Instance {
s.SshHostDsaKeyFingerprint = &v
return s
} | go | func (s *Instance) SetSshHostDsaKeyFingerprint(v string) *Instance {
s.SshHostDsaKeyFingerprint = &v
return s
} | [
"func",
"(",
"s",
"*",
"Instance",
")",
"SetSshHostDsaKeyFingerprint",
"(",
"v",
"string",
")",
"*",
"Instance",
"{",
"s",
".",
"SshHostDsaKeyFingerprint",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetSshHostDsaKeyFingerprint sets the SshHostDsaKeyFingerprint field's value. | [
"SetSshHostDsaKeyFingerprint",
"sets",
"the",
"SshHostDsaKeyFingerprint",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L12600-L12603 |
99 | aws/aws-sdk-go | service/opsworks/api.go | SetSshHostRsaKeyFingerprint | func (s *Instance) SetSshHostRsaKeyFingerprint(v string) *Instance {
s.SshHostRsaKeyFingerprint = &v
return s
} | go | func (s *Instance) SetSshHostRsaKeyFingerprint(v string) *Instance {
s.SshHostRsaKeyFingerprint = &v
return s
} | [
"func",
"(",
"s",
"*",
"Instance",
")",
"SetSshHostRsaKeyFingerprint",
"(",
"v",
"string",
")",
"*",
"Instance",
"{",
"s",
".",
"SshHostRsaKeyFingerprint",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetSshHostRsaKeyFingerprint sets the SshHostRsaKeyFingerprint field's value. | [
"SetSshHostRsaKeyFingerprint",
"sets",
"the",
"SshHostRsaKeyFingerprint",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/opsworks/api.go#L12606-L12609 |
Dataset Card for "code_x_glue_ct_code_to_text"
Dataset Summary
CodeXGLUE code-to-text dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Text/code-to-text
The dataset we use comes from CodeSearchNet and we filter the dataset as the following:
- Remove examples that codes cannot be parsed into an abstract syntax tree.
- Remove examples that #tokens of documents is < 3 or >256
- Remove examples that documents contain special tokens (e.g. <img ...> or https:...)
- Remove examples that documents are not English.
Supported Tasks and Leaderboards
machine-translation
: The dataset can be used to train a model for automatically generating English docstrings for code.
Languages
- Go programming language
- Java programming language
- Javascript programming language
- PHP programming language
- Python programming language
- Ruby programming language
- English natural language
Dataset Structure
Data Instances
go
An example of 'test' looks as follows.
{
"code": "func NewSTM(c *v3.Client, apply func(STM) error, so ...stmOption) (*v3.TxnResponse, error) {\n\topts := &stmOptions{ctx: c.Ctx()}\n\tfor _, f := range so {\n\t\tf(opts)\n\t}\n\tif len(opts.prefetch) != 0 {\n\t\tf := apply\n\t\tapply = func(s STM) error {\n\t\t\ts.Get(opts.prefetch...)\n\t\t\treturn f(s)\n\t\t}\n\t}\n\treturn runSTM(mkSTM(c, opts), apply)\n}",
"code_tokens": ["func", "NewSTM", "(", "c", "*", "v3", ".", "Client", ",", "apply", "func", "(", "STM", ")", "error", ",", "so", "...", "stmOption", ")", "(", "*", "v3", ".", "TxnResponse", ",", "error", ")", "{", "opts", ":=", "&", "stmOptions", "{", "ctx", ":", "c", ".", "Ctx", "(", ")", "}", "\n", "for", "_", ",", "f", ":=", "range", "so", "{", "f", "(", "opts", ")", "\n", "}", "\n", "if", "len", "(", "opts", ".", "prefetch", ")", "!=", "0", "{", "f", ":=", "apply", "\n", "apply", "=", "func", "(", "s", "STM", ")", "error", "{", "s", ".", "Get", "(", "opts", ".", "prefetch", "...", ")", "\n", "return", "f", "(", "s", ")", "\n", "}", "\n", "}", "\n", "return", "runSTM", "(", "mkSTM", "(", "c", ",", "opts", ")", ",", "apply", ")", "\n", "}"],
"docstring": "// NewSTM initiates a new STM instance, using serializable snapshot isolation by default.",
"docstring_tokens": ["NewSTM", "initiates", "a", "new", "STM", "instance", "using", "serializable", "snapshot", "isolation", "by", "default", "."],
"func_name": "NewSTM",
"id": 0,
"language": "go",
"original_string": "func NewSTM(c *v3.Client, apply func(STM) error, so ...stmOption) (*v3.TxnResponse, error) {\n\topts := &stmOptions{ctx: c.Ctx()}\n\tfor _, f := range so {\n\t\tf(opts)\n\t}\n\tif len(opts.prefetch) != 0 {\n\t\tf := apply\n\t\tapply = func(s STM) error {\n\t\t\ts.Get(opts.prefetch...)\n\t\t\treturn f(s)\n\t\t}\n\t}\n\treturn runSTM(mkSTM(c, opts), apply)\n}",
"path": "clientv3/concurrency/stm.go",
"repo": "etcd-io/etcd",
"sha": "616592d9ba993e3fe9798eef581316016df98906",
"url": "https://github.com/etcd-io/etcd/blob/616592d9ba993e3fe9798eef581316016df98906/clientv3/concurrency/stm.go#L89-L102"
}
java
An example of 'test' looks as follows.
{
"code": "protected final void fastPathOrderedEmit(U value, boolean delayError, Disposable disposable) {\n final Observer<? super V> observer = downstream;\n final SimplePlainQueue<U> q = queue;\n\n if (wip.get() == 0 && wip.compareAndSet(0, 1)) {\n if (q.isEmpty()) {\n accept(observer, value);\n if (leave(-1) == 0) {\n return;\n }\n } else {\n q.offer(value);\n }\n } else {\n q.offer(value);\n if (!enter()) {\n return;\n }\n }\n QueueDrainHelper.drainLoop(q, observer, delayError, disposable, this);\n }",
"code_tokens": ["protected", "final", "void", "fastPathOrderedEmit", "(", "U", "value", ",", "boolean", "delayError", ",", "Disposable", "disposable", ")", "{", "final", "Observer", "<", "?", "super", "V", ">", "observer", "=", "downstream", ";", "final", "SimplePlainQueue", "<", "U", ">", "q", "=", "queue", ";", "if", "(", "wip", ".", "get", "(", ")", "==", "0", "&&", "wip", ".", "compareAndSet", "(", "0", ",", "1", ")", ")", "{", "if", "(", "q", ".", "isEmpty", "(", ")", ")", "{", "accept", "(", "observer", ",", "value", ")", ";", "if", "(", "leave", "(", "-", "1", ")", "==", "0", ")", "{", "return", ";", "}", "}", "else", "{", "q", ".", "offer", "(", "value", ")", ";", "}", "}", "else", "{", "q", ".", "offer", "(", "value", ")", ";", "if", "(", "!", "enter", "(", ")", ")", "{", "return", ";", "}", "}", "QueueDrainHelper", ".", "drainLoop", "(", "q", ",", "observer", ",", "delayError", ",", "disposable", ",", "this", ")", ";", "}"],
"docstring": "Makes sure the fast-path emits in order.\n@param value the value to emit or queue up\n@param delayError if true, errors are delayed until the source has terminated\n@param disposable the resource to dispose if the drain terminates",
"docstring_tokens": ["Makes", "sure", "the", "fast", "-", "path", "emits", "in", "order", "."],
"func_name": "QueueDrainObserver.fastPathOrderedEmit",
"id": 0,
"language": "java",
"original_string": "protected final void fastPathOrderedEmit(U value, boolean delayError, Disposable disposable) {\n final Observer<? super V> observer = downstream;\n final SimplePlainQueue<U> q = queue;\n\n if (wip.get() == 0 && wip.compareAndSet(0, 1)) {\n if (q.isEmpty()) {\n accept(observer, value);\n if (leave(-1) == 0) {\n return;\n }\n } else {\n q.offer(value);\n }\n } else {\n q.offer(value);\n if (!enter()) {\n return;\n }\n }\n QueueDrainHelper.drainLoop(q, observer, delayError, disposable, this);\n }",
"path": "src/main/java/io/reactivex/internal/observers/QueueDrainObserver.java",
"repo": "ReactiveX/RxJava",
"sha": "ac84182aa2bd866b53e01c8e3fe99683b882c60e",
"url": "https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/internal/observers/QueueDrainObserver.java#L88-L108"
}
javascript
An example of 'test' looks as follows.
{
"code": "function createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}",
"code_tokens": ["function", "createInstance", "(", "defaultConfig", ")", "{", "var", "context", "=", "new", "Axios", "(", "defaultConfig", ")", ";", "var", "instance", "=", "bind", "(", "Axios", ".", "prototype", ".", "request", ",", "context", ")", ";", "// Copy axios.prototype to instance", "utils", ".", "extend", "(", "instance", ",", "Axios", ".", "prototype", ",", "context", ")", ";", "// Copy context to instance", "utils", ".", "extend", "(", "instance", ",", "context", ")", ";", "return", "instance", ";", "}"],
"docstring": "Create an instance of Axios\n\n@param {Object} defaultConfig The default config for the instance\n@return {Axios} A new instance of Axios",
"docstring_tokens": ["Create", "an", "instance", "of", "Axios"],
"func_name": "createInstance",
"id": 0,
"language": "javascript",
"original_string": "function createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}",
"path": "lib/axios.js",
"repo": "axios/axios",
"sha": "92d231387fe2092f8736bc1746d4caa766b675f5",
"url": "https://github.com/axios/axios/blob/92d231387fe2092f8736bc1746d4caa766b675f5/lib/axios.js#L15-L26"
}
php
An example of 'train' looks as follows.
{
"code": "public static function build($serviceAddress, $restConfigPath, array $config = [])\n {\n $config += [\n 'httpHandler' => null,\n ];\n list($baseUri, $port) = self::normalizeServiceAddress($serviceAddress);\n $requestBuilder = new RequestBuilder(\"$baseUri:$port\", $restConfigPath);\n $httpHandler = $config['httpHandler'] ?: self::buildHttpHandlerAsync();\n return new RestTransport($requestBuilder, $httpHandler);\n }",
"code_tokens": ["public", "static", "function", "build", "(", "$", "serviceAddress", ",", "$", "restConfigPath", ",", "array", "$", "config", "=", "[", "]", ")", "{", "$", "config", "+=", "[", "'httpHandler'", "=>", "null", ",", "]", ";", "list", "(", "$", "baseUri", ",", "$", "port", ")", "=", "self", "::", "normalizeServiceAddress", "(", "$", "serviceAddress", ")", ";", "$", "requestBuilder", "=", "new", "RequestBuilder", "(", "\"$baseUri:$port\"", ",", "$", "restConfigPath", ")", ";", "$", "httpHandler", "=", "$", "config", "[", "'httpHandler'", "]", "?", ":", "self", "::", "buildHttpHandlerAsync", "(", ")", ";", "return", "new", "RestTransport", "(", "$", "requestBuilder", ",", "$", "httpHandler", ")", ";", "}"],
"docstring": "Builds a RestTransport.\n\n@param string $serviceAddress\nThe address of the API remote host, for example \"example.googleapis.com\".\n@param string $restConfigPath\nPath to rest config file.\n@param array $config {\nConfig options used to construct the gRPC transport.\n\n@type callable $httpHandler A handler used to deliver PSR-7 requests.\n}\n@return RestTransport\n@throws ValidationException",
"docstring_tokens": ["Builds", "a", "RestTransport", "."],
"func_name": "RestTransport.build",
"id": 0,
"language": "php",
"original_string": "public static function build($serviceAddress, $restConfigPath, array $config = [])\n {\n $config += [\n 'httpHandler' => null,\n ];\n list($baseUri, $port) = self::normalizeServiceAddress($serviceAddress);\n $requestBuilder = new RequestBuilder(\"$baseUri:$port\", $restConfigPath);\n $httpHandler = $config['httpHandler'] ?: self::buildHttpHandlerAsync();\n return new RestTransport($requestBuilder, $httpHandler);\n }",
"path": "src/Transport/RestTransport.php",
"repo": "googleapis/gax-php",
"sha": "48387fb818c6882296710a2302a0aa973b99afb2",
"url": "https://github.com/googleapis/gax-php/blob/48387fb818c6882296710a2302a0aa973b99afb2/src/Transport/RestTransport.php#L85-L94"
}
python
An example of 'validation' looks as follows.
{
"code": "def save_act(self, path=None):\n \"\"\"Save model to a pickle located at `path`\"\"\"\n if path is None:\n path = os.path.join(logger.get_dir(), \"model.pkl\")\n\n with tempfile.TemporaryDirectory() as td:\n save_variables(os.path.join(td, \"model\"))\n arc_name = os.path.join(td, \"packed.zip\")\n with zipfile.ZipFile(arc_name, 'w') as zipf:\n for root, dirs, files in os.walk(td):\n for fname in files:\n file_path = os.path.join(root, fname)\n if file_path != arc_name:\n zipf.write(file_path, os.path.relpath(file_path, td))\n with open(arc_name, \"rb\") as f:\n model_data = f.read()\n with open(path, \"wb\") as f:\n cloudpickle.dump((model_data, self._act_params), f)",
"code_tokens": ["def", "save_act", "(", "self", ",", "path", "=", "None", ")", ":", "if", "path", "is", "None", ":", "path", "=", "os", ".", "path", ".", "join", "(", "logger", ".", "get_dir", "(", ")", ",", "\"model.pkl\"", ")", "with", "tempfile", ".", "TemporaryDirectory", "(", ")", "as", "td", ":", "save_variables", "(", "os", ".", "path", ".", "join", "(", "td", ",", "\"model\"", ")", ")", "arc_name", "=", "os", ".", "path", ".", "join", "(", "td", ",", "\"packed.zip\"", ")", "with", "zipfile", ".", "ZipFile", "(", "arc_name", ",", "'w'", ")", "as", "zipf", ":", "for", "root", ",", "dirs", ",", "files", "in", "os", ".", "walk", "(", "td", ")", ":", "for", "fname", "in", "files", ":", "file_path", "=", "os", ".", "path", ".", "join", "(", "root", ",", "fname", ")", "if", "file_path", "!=", "arc_name", ":", "zipf", ".", "write", "(", "file_path", ",", "os", ".", "path", ".", "relpath", "(", "file_path", ",", "td", ")", ")", "with", "open", "(", "arc_name", ",", "\"rb\"", ")", "as", "f", ":", "model_data", "=", "f", ".", "read", "(", ")", "with", "open", "(", "path", ",", "\"wb\"", ")", "as", "f", ":", "cloudpickle", ".", "dump", "(", "(", "model_data", ",", "self", ".", "_act_params", ")", ",", "f", ")"],
"docstring": "Save model to a pickle located at `path`",
"docstring_tokens": ["Save", "model", "to", "a", "pickle", "located", "at", "path"],
"func_name": "ActWrapper.save_act",
"id": 0,
"language": "python",
"original_string": "def save_act(self, path=None):\n \"\"\"Save model to a pickle located at `path`\"\"\"\n if path is None:\n path = os.path.join(logger.get_dir(), \"model.pkl\")\n\n with tempfile.TemporaryDirectory() as td:\n save_variables(os.path.join(td, \"model\"))\n arc_name = os.path.join(td, \"packed.zip\")\n with zipfile.ZipFile(arc_name, 'w') as zipf:\n for root, dirs, files in os.walk(td):\n for fname in files:\n file_path = os.path.join(root, fname)\n if file_path != arc_name:\n zipf.write(file_path, os.path.relpath(file_path, td))\n with open(arc_name, \"rb\") as f:\n model_data = f.read()\n with open(path, \"wb\") as f:\n cloudpickle.dump((model_data, self._act_params), f)",
"path": "baselines/deepq/deepq.py",
"repo": "openai/baselines",
"sha": "3301089b48c42b87b396e246ea3f56fa4bfc9678",
"url": "https://github.com/openai/baselines/blob/3301089b48c42b87b396e246ea3f56fa4bfc9678/baselines/deepq/deepq.py#L55-L72"
}
ruby
An example of 'train' looks as follows.
{
"code": "def render_body(context, options)\n if options.key?(:partial)\n [render_partial(context, options)]\n else\n StreamingTemplateRenderer.new(@lookup_context).render(context, options)\n end\n end",
"code_tokens": ["def", "render_body", "(", "context", ",", "options", ")", "if", "options", ".", "key?", "(", ":partial", ")", "[", "render_partial", "(", "context", ",", "options", ")", "]", "else", "StreamingTemplateRenderer", ".", "new", "(", "@lookup_context", ")", ".", "render", "(", "context", ",", "options", ")", "end", "end"],
"docstring": "Render but returns a valid Rack body. If fibers are defined, we return\n a streaming body that renders the template piece by piece.\n\n Note that partials are not supported to be rendered with streaming,\n so in such cases, we just wrap them in an array.",
"docstring_tokens": ["Render", "but", "returns", "a", "valid", "Rack", "body", ".", "If", "fibers", "are", "defined", "we", "return", "a", "streaming", "body", "that", "renders", "the", "template", "piece", "by", "piece", "."],
"func_name": "ActionView.Renderer.render_body",
"id": 0,
"language": "ruby",
"original_string": "def render_body(context, options)\n if options.key?(:partial)\n [render_partial(context, options)]\n else\n StreamingTemplateRenderer.new(@lookup_context).render(context, options)\n end\n end",
"path": "actionview/lib/action_view/renderer/renderer.rb",
"repo": "rails/rails",
"sha": "85a8bc644be69908f05740a5886ec19cd3679df5",
"url": "https://github.com/rails/rails/blob/85a8bc644be69908f05740a5886ec19cd3679df5/actionview/lib/action_view/renderer/renderer.rb#L38-L44"
}
Data Fields
In the following each data field in go is explained for each config. The data fields are the same among all splits.
go, java, javascript, php, python, ruby
field name | type | description |
---|---|---|
id | int32 | Index of the sample |
repo | string | repo: the owner/repo |
path | string | path: the full path to the original file |
func_name | string | func_name: the function or method name |
original_string | string | original_string: the raw string before tokenization or parsing |
language | string | language: the programming language name |
code | string | code/function: the part of the original_string that is code |
code_tokens | Sequence[string] | code_tokens/function_tokens: tokenized version of code |
docstring | string | docstring: the top-level comment or docstring, if it exists in the original string |
docstring_tokens | Sequence[string] | docstring_tokens: tokenized version of docstring |
sha | string | sha of the file |
url | string | url of the file |
Data Splits
name | train | validation | test |
---|---|---|---|
go | 167288 | 7325 | 8122 |
java | 164923 | 5183 | 10955 |
javascript | 58025 | 3885 | 3291 |
php | 241241 | 12982 | 14014 |
python | 251820 | 13914 | 14918 |
ruby | 24927 | 1400 | 1261 |
Dataset Creation
Curation Rationale
[More Information Needed]
Source Data
Initial Data Collection and Normalization
Data from CodeSearchNet Challenge dataset. [More Information Needed]
Who are the source language producers?
Software Engineering developers.
Annotations
Annotation process
[More Information Needed]
Who are the annotators?
[More Information Needed]
Personal and Sensitive Information
[More Information Needed]
Considerations for Using the Data
Social Impact of Dataset
[More Information Needed]
Discussion of Biases
[More Information Needed]
Other Known Limitations
[More Information Needed]
Additional Information
Dataset Curators
https://github.com/microsoft, https://github.com/madlag
Licensing Information
Computational Use of Data Agreement (C-UDA) License.
Citation Information
@article{husain2019codesearchnet,
title={Codesearchnet challenge: Evaluating the state of semantic code search},
author={Husain, Hamel and Wu, Ho-Hsiang and Gazit, Tiferet and Allamanis, Miltiadis and Brockschmidt, Marc},
journal={arXiv preprint arXiv:1909.09436},
year={2019}
}
Contributions
Thanks to @madlag (and partly also @ncoop57) for adding this dataset.
- Downloads last month
- 1,061