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
sequence
docstring
stringlengths
6
2.61k
docstring_tokens
sequence
sha
stringlengths
40
40
url
stringlengths
85
252
partition
stringclasses
1 value
aws/aws-sdk-go
private/model/api/operation.go
GetSigner
func (o *Operation) GetSigner() string { buf := bytes.NewBuffer(nil) switch o.AuthType { case "none": o.API.AddSDKImport("aws/credentials") buf.WriteString("req.Config.Credentials = credentials.AnonymousCredentials") case "v4-unsigned-body": o.API.AddSDKImport("aws/signer/v4") buf.WriteString("req.Handlers.Sign.Remove(v4.SignRequestHandler)\n") buf.WriteString("handler := v4.BuildNamedHandler(\"v4.CustomSignerHandler\", v4.WithUnsignedPayload)\n") buf.WriteString("req.Handlers.Sign.PushFrontNamed(handler)") } buf.WriteString("\n") return buf.String() }
go
func (o *Operation) GetSigner() string { buf := bytes.NewBuffer(nil) switch o.AuthType { case "none": o.API.AddSDKImport("aws/credentials") buf.WriteString("req.Config.Credentials = credentials.AnonymousCredentials") case "v4-unsigned-body": o.API.AddSDKImport("aws/signer/v4") buf.WriteString("req.Handlers.Sign.Remove(v4.SignRequestHandler)\n") buf.WriteString("handler := v4.BuildNamedHandler(\"v4.CustomSignerHandler\", v4.WithUnsignedPayload)\n") buf.WriteString("req.Handlers.Sign.PushFrontNamed(handler)") } buf.WriteString("\n") return buf.String() }
[ "func", "(", "o", "*", "Operation", ")", "GetSigner", "(", ")", "string", "{", "buf", ":=", "bytes", ".", "NewBuffer", "(", "nil", ")", "\n\n", "switch", "o", ".", "AuthType", "{", "case", "\"", "\"", ":", "o", ".", "API", ".", "AddSDKImport", "(", "\"", "\"", ")", "\n\n", "buf", ".", "WriteString", "(", "\"", "\"", ")", "\n", "case", "\"", "\"", ":", "o", ".", "API", ".", "AddSDKImport", "(", "\"", "\"", ")", "\n\n", "buf", ".", "WriteString", "(", "\"", "\\n", "\"", ")", "\n", "buf", ".", "WriteString", "(", "\"", "\\\"", "\\\"", "\\n", "\"", ")", "\n", "buf", ".", "WriteString", "(", "\"", "\"", ")", "\n", "}", "\n\n", "buf", ".", "WriteString", "(", "\"", "\\n", "\"", ")", "\n", "return", "buf", ".", "String", "(", ")", "\n", "}" ]
// GetSigner returns the signer that should be used for a API request.
[ "GetSigner", "returns", "the", "signer", "that", "should", "be", "used", "for", "a", "API", "request", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/model/api/operation.go#L106-L124
train
aws/aws-sdk-go
private/model/api/operation.go
GoCode
func (o *Operation) GoCode() string { var buf bytes.Buffer if len(o.OutputRef.Shape.EventStreamsMemberName) != 0 { o.API.AddSDKImport("aws/client") o.API.AddSDKImport("private/protocol") o.API.AddSDKImport("private/protocol/rest") o.API.AddSDKImport("private/protocol", o.API.ProtocolPackage()) } if o.API.EndpointDiscoveryOp != nil { o.API.AddSDKImport("aws/crr") o.API.AddImport("time") o.API.AddImport("net/url") } if o.Endpoint != nil && len(o.Endpoint.HostPrefix) != 0 { setupEndpointHostPrefix(o) } err := operationTmpl.Execute(&buf, o) if err != nil { panic(err) } return strings.TrimSpace(buf.String()) }
go
func (o *Operation) GoCode() string { var buf bytes.Buffer if len(o.OutputRef.Shape.EventStreamsMemberName) != 0 { o.API.AddSDKImport("aws/client") o.API.AddSDKImport("private/protocol") o.API.AddSDKImport("private/protocol/rest") o.API.AddSDKImport("private/protocol", o.API.ProtocolPackage()) } if o.API.EndpointDiscoveryOp != nil { o.API.AddSDKImport("aws/crr") o.API.AddImport("time") o.API.AddImport("net/url") } if o.Endpoint != nil && len(o.Endpoint.HostPrefix) != 0 { setupEndpointHostPrefix(o) } err := operationTmpl.Execute(&buf, o) if err != nil { panic(err) } return strings.TrimSpace(buf.String()) }
[ "func", "(", "o", "*", "Operation", ")", "GoCode", "(", ")", "string", "{", "var", "buf", "bytes", ".", "Buffer", "\n\n", "if", "len", "(", "o", ".", "OutputRef", ".", "Shape", ".", "EventStreamsMemberName", ")", "!=", "0", "{", "o", ".", "API", ".", "AddSDKImport", "(", "\"", "\"", ")", "\n", "o", ".", "API", ".", "AddSDKImport", "(", "\"", "\"", ")", "\n", "o", ".", "API", ".", "AddSDKImport", "(", "\"", "\"", ")", "\n", "o", ".", "API", ".", "AddSDKImport", "(", "\"", "\"", ",", "o", ".", "API", ".", "ProtocolPackage", "(", ")", ")", "\n", "}", "\n\n", "if", "o", ".", "API", ".", "EndpointDiscoveryOp", "!=", "nil", "{", "o", ".", "API", ".", "AddSDKImport", "(", "\"", "\"", ")", "\n", "o", ".", "API", ".", "AddImport", "(", "\"", "\"", ")", "\n", "o", ".", "API", ".", "AddImport", "(", "\"", "\"", ")", "\n", "}", "\n\n", "if", "o", ".", "Endpoint", "!=", "nil", "&&", "len", "(", "o", ".", "Endpoint", ".", "HostPrefix", ")", "!=", "0", "{", "setupEndpointHostPrefix", "(", "o", ")", "\n", "}", "\n\n", "err", ":=", "operationTmpl", ".", "Execute", "(", "&", "buf", ",", "o", ")", "\n", "if", "err", "!=", "nil", "{", "panic", "(", "err", ")", "\n", "}", "\n\n", "return", "strings", ".", "TrimSpace", "(", "buf", ".", "String", "(", ")", ")", "\n", "}" ]
// GoCode returns a string of rendered GoCode for this Operation
[ "GoCode", "returns", "a", "string", "of", "rendered", "GoCode", "for", "this", "Operation" ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/model/api/operation.go#L435-L461
train
aws/aws-sdk-go
private/model/api/operation.go
Example
func (o *Operation) Example() string { var buf bytes.Buffer err := tplExample.Execute(&buf, o) if err != nil { panic(err) } return strings.TrimSpace(buf.String()) }
go
func (o *Operation) Example() string { var buf bytes.Buffer err := tplExample.Execute(&buf, o) if err != nil { panic(err) } return strings.TrimSpace(buf.String()) }
[ "func", "(", "o", "*", "Operation", ")", "Example", "(", ")", "string", "{", "var", "buf", "bytes", ".", "Buffer", "\n", "err", ":=", "tplExample", ".", "Execute", "(", "&", "buf", ",", "o", ")", "\n", "if", "err", "!=", "nil", "{", "panic", "(", "err", ")", "\n", "}", "\n\n", "return", "strings", ".", "TrimSpace", "(", "buf", ".", "String", "(", ")", ")", "\n", "}" ]
// Example returns a string of the rendered Go code for the Operation
[ "Example", "returns", "a", "string", "of", "the", "rendered", "Go", "code", "for", "the", "Operation" ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/model/api/operation.go#L510-L518
train
aws/aws-sdk-go
private/model/api/operation.go
ExampleInput
func (o *Operation) ExampleInput() string { if len(o.InputRef.Shape.MemberRefs) == 0 { if strings.Contains(o.InputRef.GoTypeElem(), ".") { o.imports[SDKImportRoot+"service/"+strings.Split(o.InputRef.GoTypeElem(), ".")[0]] = true return fmt.Sprintf("var params *%s", o.InputRef.GoTypeElem()) } return fmt.Sprintf("var params *%s.%s", o.API.PackageName(), o.InputRef.GoTypeElem()) } e := example{o, map[string]int{}} return "params := " + e.traverseAny(o.InputRef.Shape, false, false) }
go
func (o *Operation) ExampleInput() string { if len(o.InputRef.Shape.MemberRefs) == 0 { if strings.Contains(o.InputRef.GoTypeElem(), ".") { o.imports[SDKImportRoot+"service/"+strings.Split(o.InputRef.GoTypeElem(), ".")[0]] = true return fmt.Sprintf("var params *%s", o.InputRef.GoTypeElem()) } return fmt.Sprintf("var params *%s.%s", o.API.PackageName(), o.InputRef.GoTypeElem()) } e := example{o, map[string]int{}} return "params := " + e.traverseAny(o.InputRef.Shape, false, false) }
[ "func", "(", "o", "*", "Operation", ")", "ExampleInput", "(", ")", "string", "{", "if", "len", "(", "o", ".", "InputRef", ".", "Shape", ".", "MemberRefs", ")", "==", "0", "{", "if", "strings", ".", "Contains", "(", "o", ".", "InputRef", ".", "GoTypeElem", "(", ")", ",", "\"", "\"", ")", "{", "o", ".", "imports", "[", "SDKImportRoot", "+", "\"", "\"", "+", "strings", ".", "Split", "(", "o", ".", "InputRef", ".", "GoTypeElem", "(", ")", ",", "\"", "\"", ")", "[", "0", "]", "]", "=", "true", "\n", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "o", ".", "InputRef", ".", "GoTypeElem", "(", ")", ")", "\n", "}", "\n", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "o", ".", "API", ".", "PackageName", "(", ")", ",", "o", ".", "InputRef", ".", "GoTypeElem", "(", ")", ")", "\n", "}", "\n", "e", ":=", "example", "{", "o", ",", "map", "[", "string", "]", "int", "{", "}", "}", "\n", "return", "\"", "\"", "+", "e", ".", "traverseAny", "(", "o", ".", "InputRef", ".", "Shape", ",", "false", ",", "false", ")", "\n", "}" ]
// ExampleInput return a string of the rendered Go code for an example's input parameters
[ "ExampleInput", "return", "a", "string", "of", "the", "rendered", "Go", "code", "for", "an", "example", "s", "input", "parameters" ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/model/api/operation.go#L521-L532
train
aws/aws-sdk-go
private/model/api/operation.go
ShouldDiscardResponse
func (o *Operation) ShouldDiscardResponse() bool { s := o.OutputRef.Shape return s.Placeholder || len(s.MemberRefs) == 0 }
go
func (o *Operation) ShouldDiscardResponse() bool { s := o.OutputRef.Shape return s.Placeholder || len(s.MemberRefs) == 0 }
[ "func", "(", "o", "*", "Operation", ")", "ShouldDiscardResponse", "(", ")", "bool", "{", "s", ":=", "o", ".", "OutputRef", ".", "Shape", "\n", "return", "s", ".", "Placeholder", "||", "len", "(", "s", ".", "MemberRefs", ")", "==", "0", "\n", "}" ]
// ShouldDiscardResponse returns if the operation should discard the response // returned by the service.
[ "ShouldDiscardResponse", "returns", "if", "the", "operation", "should", "discard", "the", "response", "returned", "by", "the", "service", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/model/api/operation.go#L536-L539
train
aws/aws-sdk-go
private/model/api/operation.go
traverseAny
func (e *example) traverseAny(s *Shape, required, payload bool) string { str := "" e.visited[s.ShapeName]++ switch s.Type { case "structure": str = e.traverseStruct(s, required, payload) case "list": str = e.traverseList(s, required, payload) case "map": str = e.traverseMap(s, required, payload) case "jsonvalue": str = "aws.JSONValue{\"key\": \"value\"}" if required { str += " // Required" } default: str = e.traverseScalar(s, required, payload) } e.visited[s.ShapeName]-- return str }
go
func (e *example) traverseAny(s *Shape, required, payload bool) string { str := "" e.visited[s.ShapeName]++ switch s.Type { case "structure": str = e.traverseStruct(s, required, payload) case "list": str = e.traverseList(s, required, payload) case "map": str = e.traverseMap(s, required, payload) case "jsonvalue": str = "aws.JSONValue{\"key\": \"value\"}" if required { str += " // Required" } default: str = e.traverseScalar(s, required, payload) } e.visited[s.ShapeName]-- return str }
[ "func", "(", "e", "*", "example", ")", "traverseAny", "(", "s", "*", "Shape", ",", "required", ",", "payload", "bool", ")", "string", "{", "str", ":=", "\"", "\"", "\n", "e", ".", "visited", "[", "s", ".", "ShapeName", "]", "++", "\n\n", "switch", "s", ".", "Type", "{", "case", "\"", "\"", ":", "str", "=", "e", ".", "traverseStruct", "(", "s", ",", "required", ",", "payload", ")", "\n", "case", "\"", "\"", ":", "str", "=", "e", ".", "traverseList", "(", "s", ",", "required", ",", "payload", ")", "\n", "case", "\"", "\"", ":", "str", "=", "e", ".", "traverseMap", "(", "s", ",", "required", ",", "payload", ")", "\n", "case", "\"", "\"", ":", "str", "=", "\"", "\\\"", "\\\"", "\\\"", "\\\"", "\"", "\n", "if", "required", "{", "str", "+=", "\"", "\"", "\n", "}", "\n", "default", ":", "str", "=", "e", ".", "traverseScalar", "(", "s", ",", "required", ",", "payload", ")", "\n", "}", "\n\n", "e", ".", "visited", "[", "s", ".", "ShapeName", "]", "--", "\n\n", "return", "str", "\n", "}" ]
// traverseAny returns rendered Go code for the shape.
[ "traverseAny", "returns", "rendered", "Go", "code", "for", "the", "shape", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/model/api/operation.go#L548-L571
train
aws/aws-sdk-go
private/model/api/operation.go
traverseStruct
func (e *example) traverseStruct(s *Shape, required, payload bool) string { var buf bytes.Buffer if s.resolvePkg != "" { e.imports[s.resolvePkg] = true buf.WriteString("&" + s.GoTypeElem() + "{") } else { buf.WriteString("&" + s.API.PackageName() + "." + s.GoTypeElem() + "{") } if required { buf.WriteString(" // Required") } buf.WriteString("\n") req := make([]string, len(s.Required)) copy(req, s.Required) sort.Strings(req) if e.visited[s.ShapeName] < 2 { for _, n := range req { m := s.MemberRefs[n].Shape p := n == s.Payload && (s.MemberRefs[n].Streaming || m.Streaming) buf.WriteString(n + ": " + e.traverseAny(m, true, p) + ",") if m.Type != "list" && m.Type != "structure" && m.Type != "map" { buf.WriteString(" // Required") } buf.WriteString("\n") } for _, n := range s.MemberNames() { if s.IsRequired(n) { continue } m := s.MemberRefs[n].Shape p := n == s.Payload && (s.MemberRefs[n].Streaming || m.Streaming) buf.WriteString(n + ": " + e.traverseAny(m, false, p) + ",\n") } } else { buf.WriteString("// Recursive values...\n") } buf.WriteString("}") return buf.String() }
go
func (e *example) traverseStruct(s *Shape, required, payload bool) string { var buf bytes.Buffer if s.resolvePkg != "" { e.imports[s.resolvePkg] = true buf.WriteString("&" + s.GoTypeElem() + "{") } else { buf.WriteString("&" + s.API.PackageName() + "." + s.GoTypeElem() + "{") } if required { buf.WriteString(" // Required") } buf.WriteString("\n") req := make([]string, len(s.Required)) copy(req, s.Required) sort.Strings(req) if e.visited[s.ShapeName] < 2 { for _, n := range req { m := s.MemberRefs[n].Shape p := n == s.Payload && (s.MemberRefs[n].Streaming || m.Streaming) buf.WriteString(n + ": " + e.traverseAny(m, true, p) + ",") if m.Type != "list" && m.Type != "structure" && m.Type != "map" { buf.WriteString(" // Required") } buf.WriteString("\n") } for _, n := range s.MemberNames() { if s.IsRequired(n) { continue } m := s.MemberRefs[n].Shape p := n == s.Payload && (s.MemberRefs[n].Streaming || m.Streaming) buf.WriteString(n + ": " + e.traverseAny(m, false, p) + ",\n") } } else { buf.WriteString("// Recursive values...\n") } buf.WriteString("}") return buf.String() }
[ "func", "(", "e", "*", "example", ")", "traverseStruct", "(", "s", "*", "Shape", ",", "required", ",", "payload", "bool", ")", "string", "{", "var", "buf", "bytes", ".", "Buffer", "\n\n", "if", "s", ".", "resolvePkg", "!=", "\"", "\"", "{", "e", ".", "imports", "[", "s", ".", "resolvePkg", "]", "=", "true", "\n", "buf", ".", "WriteString", "(", "\"", "\"", "+", "s", ".", "GoTypeElem", "(", ")", "+", "\"", "\"", ")", "\n", "}", "else", "{", "buf", ".", "WriteString", "(", "\"", "\"", "+", "s", ".", "API", ".", "PackageName", "(", ")", "+", "\"", "\"", "+", "s", ".", "GoTypeElem", "(", ")", "+", "\"", "\"", ")", "\n", "}", "\n\n", "if", "required", "{", "buf", ".", "WriteString", "(", "\"", "\"", ")", "\n", "}", "\n", "buf", ".", "WriteString", "(", "\"", "\\n", "\"", ")", "\n\n", "req", ":=", "make", "(", "[", "]", "string", ",", "len", "(", "s", ".", "Required", ")", ")", "\n", "copy", "(", "req", ",", "s", ".", "Required", ")", "\n", "sort", ".", "Strings", "(", "req", ")", "\n\n", "if", "e", ".", "visited", "[", "s", ".", "ShapeName", "]", "<", "2", "{", "for", "_", ",", "n", ":=", "range", "req", "{", "m", ":=", "s", ".", "MemberRefs", "[", "n", "]", ".", "Shape", "\n", "p", ":=", "n", "==", "s", ".", "Payload", "&&", "(", "s", ".", "MemberRefs", "[", "n", "]", ".", "Streaming", "||", "m", ".", "Streaming", ")", "\n", "buf", ".", "WriteString", "(", "n", "+", "\"", "\"", "+", "e", ".", "traverseAny", "(", "m", ",", "true", ",", "p", ")", "+", "\"", "\"", ")", "\n", "if", "m", ".", "Type", "!=", "\"", "\"", "&&", "m", ".", "Type", "!=", "\"", "\"", "&&", "m", ".", "Type", "!=", "\"", "\"", "{", "buf", ".", "WriteString", "(", "\"", "\"", ")", "\n", "}", "\n", "buf", ".", "WriteString", "(", "\"", "\\n", "\"", ")", "\n", "}", "\n\n", "for", "_", ",", "n", ":=", "range", "s", ".", "MemberNames", "(", ")", "{", "if", "s", ".", "IsRequired", "(", "n", ")", "{", "continue", "\n", "}", "\n", "m", ":=", "s", ".", "MemberRefs", "[", "n", "]", ".", "Shape", "\n", "p", ":=", "n", "==", "s", ".", "Payload", "&&", "(", "s", ".", "MemberRefs", "[", "n", "]", ".", "Streaming", "||", "m", ".", "Streaming", ")", "\n", "buf", ".", "WriteString", "(", "n", "+", "\"", "\"", "+", "e", ".", "traverseAny", "(", "m", ",", "false", ",", "p", ")", "+", "\"", "\\n", "\"", ")", "\n", "}", "\n", "}", "else", "{", "buf", ".", "WriteString", "(", "\"", "\\n", "\"", ")", "\n", "}", "\n\n", "buf", ".", "WriteString", "(", "\"", "\"", ")", "\n", "return", "buf", ".", "String", "(", ")", "\n", "}" ]
// traverseStruct returns rendered Go code for a structure type shape.
[ "traverseStruct", "returns", "rendered", "Go", "code", "for", "a", "structure", "type", "shape", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/model/api/operation.go#L576-L620
train
aws/aws-sdk-go
private/model/api/operation.go
traverseMap
func (e *example) traverseMap(s *Shape, required, payload bool) string { var buf bytes.Buffer t := "" if s.resolvePkg != "" { e.imports[s.resolvePkg] = true t = s.GoTypeElem() } else { t = reType.ReplaceAllString(s.GoTypeElem(), s.API.PackageName()+".$1") } buf.WriteString(t + "{") if required { buf.WriteString(" // Required") } buf.WriteString("\n") if e.visited[s.ShapeName] < 2 { m := s.ValueRef.Shape buf.WriteString("\"Key\": " + e.traverseAny(m, true, false) + ",") if m.Type != "list" && m.Type != "structure" && m.Type != "map" { buf.WriteString(" // Required") } buf.WriteString("\n// More values...\n") } else { buf.WriteString("// Recursive values...\n") } buf.WriteString("}") return buf.String() }
go
func (e *example) traverseMap(s *Shape, required, payload bool) string { var buf bytes.Buffer t := "" if s.resolvePkg != "" { e.imports[s.resolvePkg] = true t = s.GoTypeElem() } else { t = reType.ReplaceAllString(s.GoTypeElem(), s.API.PackageName()+".$1") } buf.WriteString(t + "{") if required { buf.WriteString(" // Required") } buf.WriteString("\n") if e.visited[s.ShapeName] < 2 { m := s.ValueRef.Shape buf.WriteString("\"Key\": " + e.traverseAny(m, true, false) + ",") if m.Type != "list" && m.Type != "structure" && m.Type != "map" { buf.WriteString(" // Required") } buf.WriteString("\n// More values...\n") } else { buf.WriteString("// Recursive values...\n") } buf.WriteString("}") return buf.String() }
[ "func", "(", "e", "*", "example", ")", "traverseMap", "(", "s", "*", "Shape", ",", "required", ",", "payload", "bool", ")", "string", "{", "var", "buf", "bytes", ".", "Buffer", "\n\n", "t", ":=", "\"", "\"", "\n", "if", "s", ".", "resolvePkg", "!=", "\"", "\"", "{", "e", ".", "imports", "[", "s", ".", "resolvePkg", "]", "=", "true", "\n", "t", "=", "s", ".", "GoTypeElem", "(", ")", "\n", "}", "else", "{", "t", "=", "reType", ".", "ReplaceAllString", "(", "s", ".", "GoTypeElem", "(", ")", ",", "s", ".", "API", ".", "PackageName", "(", ")", "+", "\"", "\"", ")", "\n", "}", "\n", "buf", ".", "WriteString", "(", "t", "+", "\"", "\"", ")", "\n", "if", "required", "{", "buf", ".", "WriteString", "(", "\"", "\"", ")", "\n", "}", "\n", "buf", ".", "WriteString", "(", "\"", "\\n", "\"", ")", "\n\n", "if", "e", ".", "visited", "[", "s", ".", "ShapeName", "]", "<", "2", "{", "m", ":=", "s", ".", "ValueRef", ".", "Shape", "\n", "buf", ".", "WriteString", "(", "\"", "\\\"", "\\\"", "\"", "+", "e", ".", "traverseAny", "(", "m", ",", "true", ",", "false", ")", "+", "\"", "\"", ")", "\n", "if", "m", ".", "Type", "!=", "\"", "\"", "&&", "m", ".", "Type", "!=", "\"", "\"", "&&", "m", ".", "Type", "!=", "\"", "\"", "{", "buf", ".", "WriteString", "(", "\"", "\"", ")", "\n", "}", "\n", "buf", ".", "WriteString", "(", "\"", "\\n", "\\n", "\"", ")", "\n", "}", "else", "{", "buf", ".", "WriteString", "(", "\"", "\\n", "\"", ")", "\n", "}", "\n", "buf", ".", "WriteString", "(", "\"", "\"", ")", "\n\n", "return", "buf", ".", "String", "(", ")", "\n", "}" ]
// traverseMap returns rendered Go code for a map type shape.
[ "traverseMap", "returns", "rendered", "Go", "code", "for", "a", "map", "type", "shape", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/model/api/operation.go#L623-L652
train
aws/aws-sdk-go
private/model/api/operation.go
traverseScalar
func (e *example) traverseScalar(s *Shape, required, payload bool) string { str := "" switch s.Type { case "integer", "long": str = `aws.Int64(1)` case "float", "double": str = `aws.Float64(1.0)` case "string", "character": str = `aws.String("` + s.ShapeName + `")` case "blob": if payload { str = `bytes.NewReader([]byte("PAYLOAD"))` } else { str = `[]byte("PAYLOAD")` } case "boolean": str = `aws.Bool(true)` case "timestamp": str = `aws.Time(time.Now())` default: panic("unsupported shape " + s.Type) } return str }
go
func (e *example) traverseScalar(s *Shape, required, payload bool) string { str := "" switch s.Type { case "integer", "long": str = `aws.Int64(1)` case "float", "double": str = `aws.Float64(1.0)` case "string", "character": str = `aws.String("` + s.ShapeName + `")` case "blob": if payload { str = `bytes.NewReader([]byte("PAYLOAD"))` } else { str = `[]byte("PAYLOAD")` } case "boolean": str = `aws.Bool(true)` case "timestamp": str = `aws.Time(time.Now())` default: panic("unsupported shape " + s.Type) } return str }
[ "func", "(", "e", "*", "example", ")", "traverseScalar", "(", "s", "*", "Shape", ",", "required", ",", "payload", "bool", ")", "string", "{", "str", ":=", "\"", "\"", "\n", "switch", "s", ".", "Type", "{", "case", "\"", "\"", ",", "\"", "\"", ":", "str", "=", "`aws.Int64(1)`", "\n", "case", "\"", "\"", ",", "\"", "\"", ":", "str", "=", "`aws.Float64(1.0)`", "\n", "case", "\"", "\"", ",", "\"", "\"", ":", "str", "=", "`aws.String(\"`", "+", "s", ".", "ShapeName", "+", "`\")`", "\n", "case", "\"", "\"", ":", "if", "payload", "{", "str", "=", "`bytes.NewReader([]byte(\"PAYLOAD\"))`", "\n", "}", "else", "{", "str", "=", "`[]byte(\"PAYLOAD\")`", "\n", "}", "\n", "case", "\"", "\"", ":", "str", "=", "`aws.Bool(true)`", "\n", "case", "\"", "\"", ":", "str", "=", "`aws.Time(time.Now())`", "\n", "default", ":", "panic", "(", "\"", "\"", "+", "s", ".", "Type", ")", "\n", "}", "\n\n", "return", "str", "\n", "}" ]
// traverseScalar returns an AWS Type string representation initialized to a value. // Will panic if s is an unsupported shape type.
[ "traverseScalar", "returns", "an", "AWS", "Type", "string", "representation", "initialized", "to", "a", "value", ".", "Will", "panic", "if", "s", "is", "an", "unsupported", "shape", "type", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/private/model/api/operation.go#L688-L712
train
aws/aws-sdk-go
service/kinesisvideo/service.go
newClient
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *KinesisVideo { svc := &KinesisVideo{ Client: client.New( cfg, metadata.ClientInfo{ ServiceName: ServiceName, ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, APIVersion: "2017-09-30", }, handlers, ), } // Handlers svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) // Run custom client initialization if present if initClient != nil { initClient(svc.Client) } return svc }
go
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *KinesisVideo { svc := &KinesisVideo{ Client: client.New( cfg, metadata.ClientInfo{ ServiceName: ServiceName, ServiceID: ServiceID, SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, APIVersion: "2017-09-30", }, handlers, ), } // Handlers svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) // Run custom client initialization if present if initClient != nil { initClient(svc.Client) } return svc }
[ "func", "newClient", "(", "cfg", "aws", ".", "Config", ",", "handlers", "request", ".", "Handlers", ",", "endpoint", ",", "signingRegion", ",", "signingName", "string", ")", "*", "KinesisVideo", "{", "svc", ":=", "&", "KinesisVideo", "{", "Client", ":", "client", ".", "New", "(", "cfg", ",", "metadata", ".", "ClientInfo", "{", "ServiceName", ":", "ServiceName", ",", "ServiceID", ":", "ServiceID", ",", "SigningName", ":", "signingName", ",", "SigningRegion", ":", "signingRegion", ",", "Endpoint", ":", "endpoint", ",", "APIVersion", ":", "\"", "\"", ",", "}", ",", "handlers", ",", ")", ",", "}", "\n\n", "// Handlers", "svc", ".", "Handlers", ".", "Sign", ".", "PushBackNamed", "(", "v4", ".", "SignRequestHandler", ")", "\n", "svc", ".", "Handlers", ".", "Build", ".", "PushBackNamed", "(", "restjson", ".", "BuildHandler", ")", "\n", "svc", ".", "Handlers", ".", "Unmarshal", ".", "PushBackNamed", "(", "restjson", ".", "UnmarshalHandler", ")", "\n", "svc", ".", "Handlers", ".", "UnmarshalMeta", ".", "PushBackNamed", "(", "restjson", ".", "UnmarshalMetaHandler", ")", "\n", "svc", ".", "Handlers", ".", "UnmarshalError", ".", "PushBackNamed", "(", "restjson", ".", "UnmarshalErrorHandler", ")", "\n\n", "// Run custom client initialization if present", "if", "initClient", "!=", "nil", "{", "initClient", "(", "svc", ".", "Client", ")", "\n", "}", "\n\n", "return", "svc", "\n", "}" ]
// newClient creates, initializes and returns a new service client instance.
[ "newClient", "creates", "initializes", "and", "returns", "a", "new", "service", "client", "instance", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/kinesisvideo/service.go#L53-L82
train
aws/aws-sdk-go
service/kinesisvideo/service.go
newRequest
func (c *KinesisVideo) newRequest(op *request.Operation, params, data interface{}) *request.Request { req := c.NewRequest(op, params, data) // Run custom request initialization if present if initRequest != nil { initRequest(req) } return req }
go
func (c *KinesisVideo) newRequest(op *request.Operation, params, data interface{}) *request.Request { req := c.NewRequest(op, params, data) // Run custom request initialization if present if initRequest != nil { initRequest(req) } return req }
[ "func", "(", "c", "*", "KinesisVideo", ")", "newRequest", "(", "op", "*", "request", ".", "Operation", ",", "params", ",", "data", "interface", "{", "}", ")", "*", "request", ".", "Request", "{", "req", ":=", "c", ".", "NewRequest", "(", "op", ",", "params", ",", "data", ")", "\n\n", "// Run custom request initialization if present", "if", "initRequest", "!=", "nil", "{", "initRequest", "(", "req", ")", "\n", "}", "\n\n", "return", "req", "\n", "}" ]
// newRequest creates a new request for a KinesisVideo operation and runs any // custom request initialization.
[ "newRequest", "creates", "a", "new", "request", "for", "a", "KinesisVideo", "operation", "and", "runs", "any", "custom", "request", "initialization", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/kinesisvideo/service.go#L86-L95
train
aws/aws-sdk-go
example/aws/request/httptrace/trace.go
NewRequestTrace
func NewRequestTrace(ctx context.Context) *RequestTrace { rt := &RequestTrace{ Start: time.Now(), } trace := &httptrace.ClientTrace{ GetConn: rt.getConn, GotConn: rt.gotConn, PutIdleConn: rt.putIdleConn, GotFirstResponseByte: rt.gotFirstResponseByte, Got100Continue: rt.got100Continue, DNSStart: rt.dnsStart, DNSDone: rt.dnsDone, ConnectStart: rt.connectStart, ConnectDone: rt.connectDone, TLSHandshakeStart: rt.tlsHandshakeStart, TLSHandshakeDone: rt.tlsHandshakeDone, WroteHeaders: rt.wroteHeaders, Wait100Continue: rt.wait100Continue, WroteRequest: rt.wroteRequest, } rt.Context = httptrace.WithClientTrace(ctx, trace) return rt }
go
func NewRequestTrace(ctx context.Context) *RequestTrace { rt := &RequestTrace{ Start: time.Now(), } trace := &httptrace.ClientTrace{ GetConn: rt.getConn, GotConn: rt.gotConn, PutIdleConn: rt.putIdleConn, GotFirstResponseByte: rt.gotFirstResponseByte, Got100Continue: rt.got100Continue, DNSStart: rt.dnsStart, DNSDone: rt.dnsDone, ConnectStart: rt.connectStart, ConnectDone: rt.connectDone, TLSHandshakeStart: rt.tlsHandshakeStart, TLSHandshakeDone: rt.tlsHandshakeDone, WroteHeaders: rt.wroteHeaders, Wait100Continue: rt.wait100Continue, WroteRequest: rt.wroteRequest, } rt.Context = httptrace.WithClientTrace(ctx, trace) return rt }
[ "func", "NewRequestTrace", "(", "ctx", "context", ".", "Context", ")", "*", "RequestTrace", "{", "rt", ":=", "&", "RequestTrace", "{", "Start", ":", "time", ".", "Now", "(", ")", ",", "}", "\n\n", "trace", ":=", "&", "httptrace", ".", "ClientTrace", "{", "GetConn", ":", "rt", ".", "getConn", ",", "GotConn", ":", "rt", ".", "gotConn", ",", "PutIdleConn", ":", "rt", ".", "putIdleConn", ",", "GotFirstResponseByte", ":", "rt", ".", "gotFirstResponseByte", ",", "Got100Continue", ":", "rt", ".", "got100Continue", ",", "DNSStart", ":", "rt", ".", "dnsStart", ",", "DNSDone", ":", "rt", ".", "dnsDone", ",", "ConnectStart", ":", "rt", ".", "connectStart", ",", "ConnectDone", ":", "rt", ".", "connectDone", ",", "TLSHandshakeStart", ":", "rt", ".", "tlsHandshakeStart", ",", "TLSHandshakeDone", ":", "rt", ".", "tlsHandshakeDone", ",", "WroteHeaders", ":", "rt", ".", "wroteHeaders", ",", "Wait100Continue", ":", "rt", ".", "wait100Continue", ",", "WroteRequest", ":", "rt", ".", "wroteRequest", ",", "}", "\n\n", "rt", ".", "Context", "=", "httptrace", ".", "WithClientTrace", "(", "ctx", ",", "trace", ")", "\n\n", "return", "rt", "\n", "}" ]
// NewRequestTrace returns a initialized RequestTrace for an // httptrace.ClientTrace, based on the context passed.
[ "NewRequestTrace", "returns", "a", "initialized", "RequestTrace", "for", "an", "httptrace", ".", "ClientTrace", "based", "on", "the", "context", "passed", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/example/aws/request/httptrace/trace.go#L27-L52
train
aws/aws-sdk-go
example/aws/request/httptrace/trace.go
TotalLatency
func (rt *RequestTrace) TotalLatency() time.Duration { return rt.Finish.Sub(rt.Start) }
go
func (rt *RequestTrace) TotalLatency() time.Duration { return rt.Finish.Sub(rt.Start) }
[ "func", "(", "rt", "*", "RequestTrace", ")", "TotalLatency", "(", ")", "time", ".", "Duration", "{", "return", "rt", ".", "Finish", ".", "Sub", "(", "rt", ".", "Start", ")", "\n", "}" ]
// TotalLatency returns the total time the request took.
[ "TotalLatency", "returns", "the", "total", "time", "the", "request", "took", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/example/aws/request/httptrace/trace.go#L55-L57
train
aws/aws-sdk-go
aws/awsutil/copy.go
Copy
func Copy(dst, src interface{}) { dstval := reflect.ValueOf(dst) if !dstval.IsValid() { panic("Copy dst cannot be nil") } rcopy(dstval, reflect.ValueOf(src), true) }
go
func Copy(dst, src interface{}) { dstval := reflect.ValueOf(dst) if !dstval.IsValid() { panic("Copy dst cannot be nil") } rcopy(dstval, reflect.ValueOf(src), true) }
[ "func", "Copy", "(", "dst", ",", "src", "interface", "{", "}", ")", "{", "dstval", ":=", "reflect", ".", "ValueOf", "(", "dst", ")", "\n", "if", "!", "dstval", ".", "IsValid", "(", ")", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n\n", "rcopy", "(", "dstval", ",", "reflect", ".", "ValueOf", "(", "src", ")", ",", "true", ")", "\n", "}" ]
// Copy deeply copies a src structure to dst. Useful for copying request and // response structures. // // Can copy between structs of different type, but will only copy fields which // are assignable, and exist in both structs. Fields which are not assignable, // or do not exist in both structs are ignored.
[ "Copy", "deeply", "copies", "a", "src", "structure", "to", "dst", ".", "Useful", "for", "copying", "request", "and", "response", "structures", ".", "Can", "copy", "between", "structs", "of", "different", "type", "but", "will", "only", "copy", "fields", "which", "are", "assignable", "and", "exist", "in", "both", "structs", ".", "Fields", "which", "are", "not", "assignable", "or", "do", "not", "exist", "in", "both", "structs", "are", "ignored", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/awsutil/copy.go#L15-L22
train
aws/aws-sdk-go
aws/awsutil/copy.go
CopyOf
func CopyOf(src interface{}) (dst interface{}) { dsti := reflect.New(reflect.TypeOf(src).Elem()) dst = dsti.Interface() rcopy(dsti, reflect.ValueOf(src), true) return }
go
func CopyOf(src interface{}) (dst interface{}) { dsti := reflect.New(reflect.TypeOf(src).Elem()) dst = dsti.Interface() rcopy(dsti, reflect.ValueOf(src), true) return }
[ "func", "CopyOf", "(", "src", "interface", "{", "}", ")", "(", "dst", "interface", "{", "}", ")", "{", "dsti", ":=", "reflect", ".", "New", "(", "reflect", ".", "TypeOf", "(", "src", ")", ".", "Elem", "(", ")", ")", "\n", "dst", "=", "dsti", ".", "Interface", "(", ")", "\n", "rcopy", "(", "dsti", ",", "reflect", ".", "ValueOf", "(", "src", ")", ",", "true", ")", "\n", "return", "\n", "}" ]
// CopyOf returns a copy of src while also allocating the memory for dst. // src must be a pointer type or this operation will fail.
[ "CopyOf", "returns", "a", "copy", "of", "src", "while", "also", "allocating", "the", "memory", "for", "dst", ".", "src", "must", "be", "a", "pointer", "type", "or", "this", "operation", "will", "fail", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/awsutil/copy.go#L26-L31
train
aws/aws-sdk-go
aws/config.go
WithCredentialsChainVerboseErrors
func (c *Config) WithCredentialsChainVerboseErrors(verboseErrs bool) *Config { c.CredentialsChainVerboseErrors = &verboseErrs return c }
go
func (c *Config) WithCredentialsChainVerboseErrors(verboseErrs bool) *Config { c.CredentialsChainVerboseErrors = &verboseErrs return c }
[ "func", "(", "c", "*", "Config", ")", "WithCredentialsChainVerboseErrors", "(", "verboseErrs", "bool", ")", "*", "Config", "{", "c", ".", "CredentialsChainVerboseErrors", "=", "&", "verboseErrs", "\n", "return", "c", "\n", "}" ]
// WithCredentialsChainVerboseErrors sets a config verbose errors boolean and returning // a Config pointer.
[ "WithCredentialsChainVerboseErrors", "sets", "a", "config", "verbose", "errors", "boolean", "and", "returning", "a", "Config", "pointer", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L270-L273
train
aws/aws-sdk-go
aws/config.go
WithCredentials
func (c *Config) WithCredentials(creds *credentials.Credentials) *Config { c.Credentials = creds return c }
go
func (c *Config) WithCredentials(creds *credentials.Credentials) *Config { c.Credentials = creds return c }
[ "func", "(", "c", "*", "Config", ")", "WithCredentials", "(", "creds", "*", "credentials", ".", "Credentials", ")", "*", "Config", "{", "c", ".", "Credentials", "=", "creds", "\n", "return", "c", "\n", "}" ]
// WithCredentials sets a config Credentials value returning a Config pointer // for chaining.
[ "WithCredentials", "sets", "a", "config", "Credentials", "value", "returning", "a", "Config", "pointer", "for", "chaining", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L277-L280
train
aws/aws-sdk-go
aws/config.go
WithEndpoint
func (c *Config) WithEndpoint(endpoint string) *Config { c.Endpoint = &endpoint return c }
go
func (c *Config) WithEndpoint(endpoint string) *Config { c.Endpoint = &endpoint return c }
[ "func", "(", "c", "*", "Config", ")", "WithEndpoint", "(", "endpoint", "string", ")", "*", "Config", "{", "c", ".", "Endpoint", "=", "&", "endpoint", "\n", "return", "c", "\n", "}" ]
// WithEndpoint sets a config Endpoint value returning a Config pointer for // chaining.
[ "WithEndpoint", "sets", "a", "config", "Endpoint", "value", "returning", "a", "Config", "pointer", "for", "chaining", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L284-L287
train
aws/aws-sdk-go
aws/config.go
WithEndpointResolver
func (c *Config) WithEndpointResolver(resolver endpoints.Resolver) *Config { c.EndpointResolver = resolver return c }
go
func (c *Config) WithEndpointResolver(resolver endpoints.Resolver) *Config { c.EndpointResolver = resolver return c }
[ "func", "(", "c", "*", "Config", ")", "WithEndpointResolver", "(", "resolver", "endpoints", ".", "Resolver", ")", "*", "Config", "{", "c", ".", "EndpointResolver", "=", "resolver", "\n", "return", "c", "\n", "}" ]
// WithEndpointResolver sets a config EndpointResolver value returning a // Config pointer for chaining.
[ "WithEndpointResolver", "sets", "a", "config", "EndpointResolver", "value", "returning", "a", "Config", "pointer", "for", "chaining", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L291-L294
train
aws/aws-sdk-go
aws/config.go
WithRegion
func (c *Config) WithRegion(region string) *Config { c.Region = &region return c }
go
func (c *Config) WithRegion(region string) *Config { c.Region = &region return c }
[ "func", "(", "c", "*", "Config", ")", "WithRegion", "(", "region", "string", ")", "*", "Config", "{", "c", ".", "Region", "=", "&", "region", "\n", "return", "c", "\n", "}" ]
// WithRegion sets a config Region value returning a Config pointer for // chaining.
[ "WithRegion", "sets", "a", "config", "Region", "value", "returning", "a", "Config", "pointer", "for", "chaining", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L298-L301
train
aws/aws-sdk-go
aws/config.go
WithDisableSSL
func (c *Config) WithDisableSSL(disable bool) *Config { c.DisableSSL = &disable return c }
go
func (c *Config) WithDisableSSL(disable bool) *Config { c.DisableSSL = &disable return c }
[ "func", "(", "c", "*", "Config", ")", "WithDisableSSL", "(", "disable", "bool", ")", "*", "Config", "{", "c", ".", "DisableSSL", "=", "&", "disable", "\n", "return", "c", "\n", "}" ]
// WithDisableSSL sets a config DisableSSL value returning a Config pointer // for chaining.
[ "WithDisableSSL", "sets", "a", "config", "DisableSSL", "value", "returning", "a", "Config", "pointer", "for", "chaining", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L305-L308
train
aws/aws-sdk-go
aws/config.go
WithHTTPClient
func (c *Config) WithHTTPClient(client *http.Client) *Config { c.HTTPClient = client return c }
go
func (c *Config) WithHTTPClient(client *http.Client) *Config { c.HTTPClient = client return c }
[ "func", "(", "c", "*", "Config", ")", "WithHTTPClient", "(", "client", "*", "http", ".", "Client", ")", "*", "Config", "{", "c", ".", "HTTPClient", "=", "client", "\n", "return", "c", "\n", "}" ]
// WithHTTPClient sets a config HTTPClient value returning a Config pointer // for chaining.
[ "WithHTTPClient", "sets", "a", "config", "HTTPClient", "value", "returning", "a", "Config", "pointer", "for", "chaining", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L312-L315
train
aws/aws-sdk-go
aws/config.go
WithMaxRetries
func (c *Config) WithMaxRetries(max int) *Config { c.MaxRetries = &max return c }
go
func (c *Config) WithMaxRetries(max int) *Config { c.MaxRetries = &max return c }
[ "func", "(", "c", "*", "Config", ")", "WithMaxRetries", "(", "max", "int", ")", "*", "Config", "{", "c", ".", "MaxRetries", "=", "&", "max", "\n", "return", "c", "\n", "}" ]
// WithMaxRetries sets a config MaxRetries value returning a Config pointer // for chaining.
[ "WithMaxRetries", "sets", "a", "config", "MaxRetries", "value", "returning", "a", "Config", "pointer", "for", "chaining", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L319-L322
train
aws/aws-sdk-go
aws/config.go
WithDisableParamValidation
func (c *Config) WithDisableParamValidation(disable bool) *Config { c.DisableParamValidation = &disable return c }
go
func (c *Config) WithDisableParamValidation(disable bool) *Config { c.DisableParamValidation = &disable return c }
[ "func", "(", "c", "*", "Config", ")", "WithDisableParamValidation", "(", "disable", "bool", ")", "*", "Config", "{", "c", ".", "DisableParamValidation", "=", "&", "disable", "\n", "return", "c", "\n", "}" ]
// WithDisableParamValidation sets a config DisableParamValidation value // returning a Config pointer for chaining.
[ "WithDisableParamValidation", "sets", "a", "config", "DisableParamValidation", "value", "returning", "a", "Config", "pointer", "for", "chaining", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L326-L329
train
aws/aws-sdk-go
aws/config.go
WithDisableComputeChecksums
func (c *Config) WithDisableComputeChecksums(disable bool) *Config { c.DisableComputeChecksums = &disable return c }
go
func (c *Config) WithDisableComputeChecksums(disable bool) *Config { c.DisableComputeChecksums = &disable return c }
[ "func", "(", "c", "*", "Config", ")", "WithDisableComputeChecksums", "(", "disable", "bool", ")", "*", "Config", "{", "c", ".", "DisableComputeChecksums", "=", "&", "disable", "\n", "return", "c", "\n", "}" ]
// WithDisableComputeChecksums sets a config DisableComputeChecksums value // returning a Config pointer for chaining.
[ "WithDisableComputeChecksums", "sets", "a", "config", "DisableComputeChecksums", "value", "returning", "a", "Config", "pointer", "for", "chaining", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L333-L336
train
aws/aws-sdk-go
aws/config.go
WithLogLevel
func (c *Config) WithLogLevel(level LogLevelType) *Config { c.LogLevel = &level return c }
go
func (c *Config) WithLogLevel(level LogLevelType) *Config { c.LogLevel = &level return c }
[ "func", "(", "c", "*", "Config", ")", "WithLogLevel", "(", "level", "LogLevelType", ")", "*", "Config", "{", "c", ".", "LogLevel", "=", "&", "level", "\n", "return", "c", "\n", "}" ]
// WithLogLevel sets a config LogLevel value returning a Config pointer for // chaining.
[ "WithLogLevel", "sets", "a", "config", "LogLevel", "value", "returning", "a", "Config", "pointer", "for", "chaining", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L340-L343
train
aws/aws-sdk-go
aws/config.go
WithS3ForcePathStyle
func (c *Config) WithS3ForcePathStyle(force bool) *Config { c.S3ForcePathStyle = &force return c }
go
func (c *Config) WithS3ForcePathStyle(force bool) *Config { c.S3ForcePathStyle = &force return c }
[ "func", "(", "c", "*", "Config", ")", "WithS3ForcePathStyle", "(", "force", "bool", ")", "*", "Config", "{", "c", ".", "S3ForcePathStyle", "=", "&", "force", "\n", "return", "c", "\n", "}" ]
// WithS3ForcePathStyle sets a config S3ForcePathStyle value returning a Config // pointer for chaining.
[ "WithS3ForcePathStyle", "sets", "a", "config", "S3ForcePathStyle", "value", "returning", "a", "Config", "pointer", "for", "chaining", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L354-L357
train
aws/aws-sdk-go
aws/config.go
WithS3Disable100Continue
func (c *Config) WithS3Disable100Continue(disable bool) *Config { c.S3Disable100Continue = &disable return c }
go
func (c *Config) WithS3Disable100Continue(disable bool) *Config { c.S3Disable100Continue = &disable return c }
[ "func", "(", "c", "*", "Config", ")", "WithS3Disable100Continue", "(", "disable", "bool", ")", "*", "Config", "{", "c", ".", "S3Disable100Continue", "=", "&", "disable", "\n", "return", "c", "\n", "}" ]
// WithS3Disable100Continue sets a config S3Disable100Continue value returning // a Config pointer for chaining.
[ "WithS3Disable100Continue", "sets", "a", "config", "S3Disable100Continue", "value", "returning", "a", "Config", "pointer", "for", "chaining", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L361-L364
train
aws/aws-sdk-go
aws/config.go
WithS3UseAccelerate
func (c *Config) WithS3UseAccelerate(enable bool) *Config { c.S3UseAccelerate = &enable return c }
go
func (c *Config) WithS3UseAccelerate(enable bool) *Config { c.S3UseAccelerate = &enable return c }
[ "func", "(", "c", "*", "Config", ")", "WithS3UseAccelerate", "(", "enable", "bool", ")", "*", "Config", "{", "c", ".", "S3UseAccelerate", "=", "&", "enable", "\n", "return", "c", "\n\n", "}" ]
// WithS3UseAccelerate sets a config S3UseAccelerate value returning a Config // pointer for chaining.
[ "WithS3UseAccelerate", "sets", "a", "config", "S3UseAccelerate", "value", "returning", "a", "Config", "pointer", "for", "chaining", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L368-L372
train
aws/aws-sdk-go
aws/config.go
WithS3DisableContentMD5Validation
func (c *Config) WithS3DisableContentMD5Validation(enable bool) *Config { c.S3DisableContentMD5Validation = &enable return c }
go
func (c *Config) WithS3DisableContentMD5Validation(enable bool) *Config { c.S3DisableContentMD5Validation = &enable return c }
[ "func", "(", "c", "*", "Config", ")", "WithS3DisableContentMD5Validation", "(", "enable", "bool", ")", "*", "Config", "{", "c", ".", "S3DisableContentMD5Validation", "=", "&", "enable", "\n", "return", "c", "\n\n", "}" ]
// WithS3DisableContentMD5Validation sets a config // S3DisableContentMD5Validation value returning a Config pointer for chaining.
[ "WithS3DisableContentMD5Validation", "sets", "a", "config", "S3DisableContentMD5Validation", "value", "returning", "a", "Config", "pointer", "for", "chaining", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L376-L380
train
aws/aws-sdk-go
aws/config.go
WithUseDualStack
func (c *Config) WithUseDualStack(enable bool) *Config { c.UseDualStack = &enable return c }
go
func (c *Config) WithUseDualStack(enable bool) *Config { c.UseDualStack = &enable return c }
[ "func", "(", "c", "*", "Config", ")", "WithUseDualStack", "(", "enable", "bool", ")", "*", "Config", "{", "c", ".", "UseDualStack", "=", "&", "enable", "\n", "return", "c", "\n", "}" ]
// WithUseDualStack sets a config UseDualStack value returning a Config // pointer for chaining.
[ "WithUseDualStack", "sets", "a", "config", "UseDualStack", "value", "returning", "a", "Config", "pointer", "for", "chaining", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L384-L387
train
aws/aws-sdk-go
aws/config.go
WithEC2MetadataDisableTimeoutOverride
func (c *Config) WithEC2MetadataDisableTimeoutOverride(enable bool) *Config { c.EC2MetadataDisableTimeoutOverride = &enable return c }
go
func (c *Config) WithEC2MetadataDisableTimeoutOverride(enable bool) *Config { c.EC2MetadataDisableTimeoutOverride = &enable return c }
[ "func", "(", "c", "*", "Config", ")", "WithEC2MetadataDisableTimeoutOverride", "(", "enable", "bool", ")", "*", "Config", "{", "c", ".", "EC2MetadataDisableTimeoutOverride", "=", "&", "enable", "\n", "return", "c", "\n", "}" ]
// WithEC2MetadataDisableTimeoutOverride sets a config EC2MetadataDisableTimeoutOverride value // returning a Config pointer for chaining.
[ "WithEC2MetadataDisableTimeoutOverride", "sets", "a", "config", "EC2MetadataDisableTimeoutOverride", "value", "returning", "a", "Config", "pointer", "for", "chaining", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L391-L394
train
aws/aws-sdk-go
aws/config.go
WithSleepDelay
func (c *Config) WithSleepDelay(fn func(time.Duration)) *Config { c.SleepDelay = fn return c }
go
func (c *Config) WithSleepDelay(fn func(time.Duration)) *Config { c.SleepDelay = fn return c }
[ "func", "(", "c", "*", "Config", ")", "WithSleepDelay", "(", "fn", "func", "(", "time", ".", "Duration", ")", ")", "*", "Config", "{", "c", ".", "SleepDelay", "=", "fn", "\n", "return", "c", "\n", "}" ]
// WithSleepDelay overrides the function used to sleep while waiting for the // next retry. Defaults to time.Sleep.
[ "WithSleepDelay", "overrides", "the", "function", "used", "to", "sleep", "while", "waiting", "for", "the", "next", "retry", ".", "Defaults", "to", "time", ".", "Sleep", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L398-L401
train
aws/aws-sdk-go
aws/config.go
WithEndpointDiscovery
func (c *Config) WithEndpointDiscovery(t bool) *Config { c.EnableEndpointDiscovery = &t return c }
go
func (c *Config) WithEndpointDiscovery(t bool) *Config { c.EnableEndpointDiscovery = &t return c }
[ "func", "(", "c", "*", "Config", ")", "WithEndpointDiscovery", "(", "t", "bool", ")", "*", "Config", "{", "c", ".", "EnableEndpointDiscovery", "=", "&", "t", "\n", "return", "c", "\n", "}" ]
// WithEndpointDiscovery will set whether or not to use endpoint discovery.
[ "WithEndpointDiscovery", "will", "set", "whether", "or", "not", "to", "use", "endpoint", "discovery", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L404-L407
train
aws/aws-sdk-go
aws/config.go
WithDisableEndpointHostPrefix
func (c *Config) WithDisableEndpointHostPrefix(t bool) *Config { c.DisableEndpointHostPrefix = &t return c }
go
func (c *Config) WithDisableEndpointHostPrefix(t bool) *Config { c.DisableEndpointHostPrefix = &t return c }
[ "func", "(", "c", "*", "Config", ")", "WithDisableEndpointHostPrefix", "(", "t", "bool", ")", "*", "Config", "{", "c", ".", "DisableEndpointHostPrefix", "=", "&", "t", "\n", "return", "c", "\n", "}" ]
// WithDisableEndpointHostPrefix will set whether or not to use modeled host prefix // when making requests.
[ "WithDisableEndpointHostPrefix", "will", "set", "whether", "or", "not", "to", "use", "modeled", "host", "prefix", "when", "making", "requests", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L411-L414
train
aws/aws-sdk-go
aws/config.go
MergeIn
func (c *Config) MergeIn(cfgs ...*Config) { for _, other := range cfgs { mergeInConfig(c, other) } }
go
func (c *Config) MergeIn(cfgs ...*Config) { for _, other := range cfgs { mergeInConfig(c, other) } }
[ "func", "(", "c", "*", "Config", ")", "MergeIn", "(", "cfgs", "...", "*", "Config", ")", "{", "for", "_", ",", "other", ":=", "range", "cfgs", "{", "mergeInConfig", "(", "c", ",", "other", ")", "\n", "}", "\n", "}" ]
// MergeIn merges the passed in configs into the existing config object.
[ "MergeIn", "merges", "the", "passed", "in", "configs", "into", "the", "existing", "config", "object", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L417-L421
train
aws/aws-sdk-go
aws/config.go
Copy
func (c *Config) Copy(cfgs ...*Config) *Config { dst := &Config{} dst.MergeIn(c) for _, cfg := range cfgs { dst.MergeIn(cfg) } return dst }
go
func (c *Config) Copy(cfgs ...*Config) *Config { dst := &Config{} dst.MergeIn(c) for _, cfg := range cfgs { dst.MergeIn(cfg) } return dst }
[ "func", "(", "c", "*", "Config", ")", "Copy", "(", "cfgs", "...", "*", "Config", ")", "*", "Config", "{", "dst", ":=", "&", "Config", "{", "}", "\n", "dst", ".", "MergeIn", "(", "c", ")", "\n\n", "for", "_", ",", "cfg", ":=", "range", "cfgs", "{", "dst", ".", "MergeIn", "(", "cfg", ")", "\n", "}", "\n\n", "return", "dst", "\n", "}" ]
// Copy will return a shallow copy of the Config object. If any additional // configurations are provided they will be merged into the new config returned.
[ "Copy", "will", "return", "a", "shallow", "copy", "of", "the", "Config", "object", ".", "If", "any", "additional", "configurations", "are", "provided", "they", "will", "be", "merged", "into", "the", "new", "config", "returned", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/config.go#L527-L536
train
aws/aws-sdk-go
service/cloudfront/sign/randomreader.go
newRandomReader
func newRandomReader(r *rand.Rand) *randomReader { return &randomReader{b: &bytes.Buffer{}, r: r} }
go
func newRandomReader(r *rand.Rand) *randomReader { return &randomReader{b: &bytes.Buffer{}, r: r} }
[ "func", "newRandomReader", "(", "r", "*", "rand", ".", "Rand", ")", "*", "randomReader", "{", "return", "&", "randomReader", "{", "b", ":", "&", "bytes", ".", "Buffer", "{", "}", ",", "r", ":", "r", "}", "\n", "}" ]
// newRandomReader returns a new instance of the random reader
[ "newRandomReader", "returns", "a", "new", "instance", "of", "the", "random", "reader" ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/cloudfront/sign/randomreader.go#L17-L19
train
aws/aws-sdk-go
service/cloudfront/sign/randomreader.go
Read
func (m *randomReader) Read(b []byte) (int, error) { for i := 0; i < len(b); { binary.Write(m.b, binary.LittleEndian, m.r.Int63()) n, _ := m.b.Read(b[i:]) i += n } return len(b), nil }
go
func (m *randomReader) Read(b []byte) (int, error) { for i := 0; i < len(b); { binary.Write(m.b, binary.LittleEndian, m.r.Int63()) n, _ := m.b.Read(b[i:]) i += n } return len(b), nil }
[ "func", "(", "m", "*", "randomReader", ")", "Read", "(", "b", "[", "]", "byte", ")", "(", "int", ",", "error", ")", "{", "for", "i", ":=", "0", ";", "i", "<", "len", "(", "b", ")", ";", "{", "binary", ".", "Write", "(", "m", ".", "b", ",", "binary", ".", "LittleEndian", ",", "m", ".", "r", ".", "Int63", "(", ")", ")", "\n", "n", ",", "_", ":=", "m", ".", "b", ".", "Read", "(", "b", "[", "i", ":", "]", ")", "\n", "i", "+=", "n", "\n", "}", "\n\n", "return", "len", "(", "b", ")", ",", "nil", "\n", "}" ]
// Read will read random bytes from up to the length of b.
[ "Read", "will", "read", "random", "bytes", "from", "up", "to", "the", "length", "of", "b", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/cloudfront/sign/randomreader.go#L22-L30
train
aws/aws-sdk-go
service/s3control/api.go
SetFailureReasons
func (s *JobDescriptor) SetFailureReasons(v []*JobFailure) *JobDescriptor { s.FailureReasons = v return s }
go
func (s *JobDescriptor) SetFailureReasons(v []*JobFailure) *JobDescriptor { s.FailureReasons = v return s }
[ "func", "(", "s", "*", "JobDescriptor", ")", "SetFailureReasons", "(", "v", "[", "]", "*", "JobFailure", ")", "*", "JobDescriptor", "{", "s", ".", "FailureReasons", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetFailureReasons sets the FailureReasons field's value.
[ "SetFailureReasons", "sets", "the", "FailureReasons", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L1245-L1248
train
aws/aws-sdk-go
service/s3control/api.go
SetSuspendedCause
func (s *JobDescriptor) SetSuspendedCause(v string) *JobDescriptor { s.SuspendedCause = &v return s }
go
func (s *JobDescriptor) SetSuspendedCause(v string) *JobDescriptor { s.SuspendedCause = &v return s }
[ "func", "(", "s", "*", "JobDescriptor", ")", "SetSuspendedCause", "(", "v", "string", ")", "*", "JobDescriptor", "{", "s", ".", "SuspendedCause", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetSuspendedCause sets the SuspendedCause field's value.
[ "SetSuspendedCause", "sets", "the", "SuspendedCause", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L1311-L1314
train
aws/aws-sdk-go
service/s3control/api.go
SetSuspendedDate
func (s *JobDescriptor) SetSuspendedDate(v time.Time) *JobDescriptor { s.SuspendedDate = &v return s }
go
func (s *JobDescriptor) SetSuspendedDate(v time.Time) *JobDescriptor { s.SuspendedDate = &v return s }
[ "func", "(", "s", "*", "JobDescriptor", ")", "SetSuspendedDate", "(", "v", "time", ".", "Time", ")", "*", "JobDescriptor", "{", "s", ".", "SuspendedDate", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetSuspendedDate sets the SuspendedDate field's value.
[ "SetSuspendedDate", "sets", "the", "SuspendedDate", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L1317-L1320
train
aws/aws-sdk-go
service/s3control/api.go
SetObjectArn
func (s *JobManifestLocation) SetObjectArn(v string) *JobManifestLocation { s.ObjectArn = &v return s }
go
func (s *JobManifestLocation) SetObjectArn(v string) *JobManifestLocation { s.ObjectArn = &v return s }
[ "func", "(", "s", "*", "JobManifestLocation", ")", "SetObjectArn", "(", "v", "string", ")", "*", "JobManifestLocation", "{", "s", ".", "ObjectArn", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetObjectArn sets the ObjectArn field's value.
[ "SetObjectArn", "sets", "the", "ObjectArn", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L1577-L1580
train
aws/aws-sdk-go
service/s3control/api.go
SetObjectVersionId
func (s *JobManifestLocation) SetObjectVersionId(v string) *JobManifestLocation { s.ObjectVersionId = &v return s }
go
func (s *JobManifestLocation) SetObjectVersionId(v string) *JobManifestLocation { s.ObjectVersionId = &v return s }
[ "func", "(", "s", "*", "JobManifestLocation", ")", "SetObjectVersionId", "(", "v", "string", ")", "*", "JobManifestLocation", "{", "s", ".", "ObjectVersionId", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetObjectVersionId sets the ObjectVersionId field's value.
[ "SetObjectVersionId", "sets", "the", "ObjectVersionId", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L1583-L1586
train
aws/aws-sdk-go
service/s3control/api.go
SetLambdaInvoke
func (s *JobOperation) SetLambdaInvoke(v *LambdaInvokeOperation) *JobOperation { s.LambdaInvoke = v return s }
go
func (s *JobOperation) SetLambdaInvoke(v *LambdaInvokeOperation) *JobOperation { s.LambdaInvoke = v return s }
[ "func", "(", "s", "*", "JobOperation", ")", "SetLambdaInvoke", "(", "v", "*", "LambdaInvokeOperation", ")", "*", "JobOperation", "{", "s", ".", "LambdaInvoke", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetLambdaInvoke sets the LambdaInvoke field's value.
[ "SetLambdaInvoke", "sets", "the", "LambdaInvoke", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L1707-L1710
train
aws/aws-sdk-go
service/s3control/api.go
SetS3InitiateRestoreObject
func (s *JobOperation) SetS3InitiateRestoreObject(v *S3InitiateRestoreObjectOperation) *JobOperation { s.S3InitiateRestoreObject = v return s }
go
func (s *JobOperation) SetS3InitiateRestoreObject(v *S3InitiateRestoreObjectOperation) *JobOperation { s.S3InitiateRestoreObject = v return s }
[ "func", "(", "s", "*", "JobOperation", ")", "SetS3InitiateRestoreObject", "(", "v", "*", "S3InitiateRestoreObjectOperation", ")", "*", "JobOperation", "{", "s", ".", "S3InitiateRestoreObject", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetS3InitiateRestoreObject sets the S3InitiateRestoreObject field's value.
[ "SetS3InitiateRestoreObject", "sets", "the", "S3InitiateRestoreObject", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L1713-L1716
train
aws/aws-sdk-go
service/s3control/api.go
SetS3PutObjectAcl
func (s *JobOperation) SetS3PutObjectAcl(v *S3SetObjectAclOperation) *JobOperation { s.S3PutObjectAcl = v return s }
go
func (s *JobOperation) SetS3PutObjectAcl(v *S3SetObjectAclOperation) *JobOperation { s.S3PutObjectAcl = v return s }
[ "func", "(", "s", "*", "JobOperation", ")", "SetS3PutObjectAcl", "(", "v", "*", "S3SetObjectAclOperation", ")", "*", "JobOperation", "{", "s", ".", "S3PutObjectAcl", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetS3PutObjectAcl sets the S3PutObjectAcl field's value.
[ "SetS3PutObjectAcl", "sets", "the", "S3PutObjectAcl", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L1719-L1722
train
aws/aws-sdk-go
service/s3control/api.go
SetS3PutObjectCopy
func (s *JobOperation) SetS3PutObjectCopy(v *S3CopyObjectOperation) *JobOperation { s.S3PutObjectCopy = v return s }
go
func (s *JobOperation) SetS3PutObjectCopy(v *S3CopyObjectOperation) *JobOperation { s.S3PutObjectCopy = v return s }
[ "func", "(", "s", "*", "JobOperation", ")", "SetS3PutObjectCopy", "(", "v", "*", "S3CopyObjectOperation", ")", "*", "JobOperation", "{", "s", ".", "S3PutObjectCopy", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetS3PutObjectCopy sets the S3PutObjectCopy field's value.
[ "SetS3PutObjectCopy", "sets", "the", "S3PutObjectCopy", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L1725-L1728
train
aws/aws-sdk-go
service/s3control/api.go
SetS3PutObjectTagging
func (s *JobOperation) SetS3PutObjectTagging(v *S3SetObjectTaggingOperation) *JobOperation { s.S3PutObjectTagging = v return s }
go
func (s *JobOperation) SetS3PutObjectTagging(v *S3SetObjectTaggingOperation) *JobOperation { s.S3PutObjectTagging = v return s }
[ "func", "(", "s", "*", "JobOperation", ")", "SetS3PutObjectTagging", "(", "v", "*", "S3SetObjectTaggingOperation", ")", "*", "JobOperation", "{", "s", ".", "S3PutObjectTagging", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetS3PutObjectTagging sets the S3PutObjectTagging field's value.
[ "SetS3PutObjectTagging", "sets", "the", "S3PutObjectTagging", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L1731-L1734
train
aws/aws-sdk-go
service/s3control/api.go
SetNumberOfTasksFailed
func (s *JobProgressSummary) SetNumberOfTasksFailed(v int64) *JobProgressSummary { s.NumberOfTasksFailed = &v return s }
go
func (s *JobProgressSummary) SetNumberOfTasksFailed(v int64) *JobProgressSummary { s.NumberOfTasksFailed = &v return s }
[ "func", "(", "s", "*", "JobProgressSummary", ")", "SetNumberOfTasksFailed", "(", "v", "int64", ")", "*", "JobProgressSummary", "{", "s", ".", "NumberOfTasksFailed", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetNumberOfTasksFailed sets the NumberOfTasksFailed field's value.
[ "SetNumberOfTasksFailed", "sets", "the", "NumberOfTasksFailed", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L1759-L1762
train
aws/aws-sdk-go
service/s3control/api.go
SetNumberOfTasksSucceeded
func (s *JobProgressSummary) SetNumberOfTasksSucceeded(v int64) *JobProgressSummary { s.NumberOfTasksSucceeded = &v return s }
go
func (s *JobProgressSummary) SetNumberOfTasksSucceeded(v int64) *JobProgressSummary { s.NumberOfTasksSucceeded = &v return s }
[ "func", "(", "s", "*", "JobProgressSummary", ")", "SetNumberOfTasksSucceeded", "(", "v", "int64", ")", "*", "JobProgressSummary", "{", "s", ".", "NumberOfTasksSucceeded", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetNumberOfTasksSucceeded sets the NumberOfTasksSucceeded field's value.
[ "SetNumberOfTasksSucceeded", "sets", "the", "NumberOfTasksSucceeded", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L1765-L1768
train
aws/aws-sdk-go
service/s3control/api.go
SetTotalNumberOfTasks
func (s *JobProgressSummary) SetTotalNumberOfTasks(v int64) *JobProgressSummary { s.TotalNumberOfTasks = &v return s }
go
func (s *JobProgressSummary) SetTotalNumberOfTasks(v int64) *JobProgressSummary { s.TotalNumberOfTasks = &v return s }
[ "func", "(", "s", "*", "JobProgressSummary", ")", "SetTotalNumberOfTasks", "(", "v", "int64", ")", "*", "JobProgressSummary", "{", "s", ".", "TotalNumberOfTasks", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetTotalNumberOfTasks sets the TotalNumberOfTasks field's value.
[ "SetTotalNumberOfTasks", "sets", "the", "TotalNumberOfTasks", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L1771-L1774
train
aws/aws-sdk-go
service/s3control/api.go
SetReportScope
func (s *JobReport) SetReportScope(v string) *JobReport { s.ReportScope = &v return s }
go
func (s *JobReport) SetReportScope(v string) *JobReport { s.ReportScope = &v return s }
[ "func", "(", "s", "*", "JobReport", ")", "SetReportScope", "(", "v", "string", ")", "*", "JobReport", "{", "s", ".", "ReportScope", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetReportScope sets the ReportScope field's value.
[ "SetReportScope", "sets", "the", "ReportScope", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L1855-L1858
train
aws/aws-sdk-go
service/s3control/api.go
SetJobStatuses
func (s *ListJobsInput) SetJobStatuses(v []*string) *ListJobsInput { s.JobStatuses = v return s }
go
func (s *ListJobsInput) SetJobStatuses(v []*string) *ListJobsInput { s.JobStatuses = v return s }
[ "func", "(", "s", "*", "ListJobsInput", ")", "SetJobStatuses", "(", "v", "[", "]", "*", "string", ")", "*", "ListJobsInput", "{", "s", ".", "JobStatuses", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetJobStatuses sets the JobStatuses field's value.
[ "SetJobStatuses", "sets", "the", "JobStatuses", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L1958-L1961
train
aws/aws-sdk-go
service/s3control/api.go
SetAccessControlGrants
func (s *S3CopyObjectOperation) SetAccessControlGrants(v []*S3Grant) *S3CopyObjectOperation { s.AccessControlGrants = v return s }
go
func (s *S3CopyObjectOperation) SetAccessControlGrants(v []*S3Grant) *S3CopyObjectOperation { s.AccessControlGrants = v return s }
[ "func", "(", "s", "*", "S3CopyObjectOperation", ")", "SetAccessControlGrants", "(", "v", "[", "]", "*", "S3Grant", ")", "*", "S3CopyObjectOperation", "{", "s", ".", "AccessControlGrants", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetAccessControlGrants sets the AccessControlGrants field's value.
[ "SetAccessControlGrants", "sets", "the", "AccessControlGrants", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L2334-L2337
train
aws/aws-sdk-go
service/s3control/api.go
SetModifiedSinceConstraint
func (s *S3CopyObjectOperation) SetModifiedSinceConstraint(v time.Time) *S3CopyObjectOperation { s.ModifiedSinceConstraint = &v return s }
go
func (s *S3CopyObjectOperation) SetModifiedSinceConstraint(v time.Time) *S3CopyObjectOperation { s.ModifiedSinceConstraint = &v return s }
[ "func", "(", "s", "*", "S3CopyObjectOperation", ")", "SetModifiedSinceConstraint", "(", "v", "time", ".", "Time", ")", "*", "S3CopyObjectOperation", "{", "s", ".", "ModifiedSinceConstraint", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetModifiedSinceConstraint sets the ModifiedSinceConstraint field's value.
[ "SetModifiedSinceConstraint", "sets", "the", "ModifiedSinceConstraint", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L2352-L2355
train
aws/aws-sdk-go
service/s3control/api.go
SetNewObjectMetadata
func (s *S3CopyObjectOperation) SetNewObjectMetadata(v *S3ObjectMetadata) *S3CopyObjectOperation { s.NewObjectMetadata = v return s }
go
func (s *S3CopyObjectOperation) SetNewObjectMetadata(v *S3ObjectMetadata) *S3CopyObjectOperation { s.NewObjectMetadata = v return s }
[ "func", "(", "s", "*", "S3CopyObjectOperation", ")", "SetNewObjectMetadata", "(", "v", "*", "S3ObjectMetadata", ")", "*", "S3CopyObjectOperation", "{", "s", ".", "NewObjectMetadata", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetNewObjectMetadata sets the NewObjectMetadata field's value.
[ "SetNewObjectMetadata", "sets", "the", "NewObjectMetadata", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L2358-L2361
train
aws/aws-sdk-go
service/s3control/api.go
SetNewObjectTagging
func (s *S3CopyObjectOperation) SetNewObjectTagging(v []*S3Tag) *S3CopyObjectOperation { s.NewObjectTagging = v return s }
go
func (s *S3CopyObjectOperation) SetNewObjectTagging(v []*S3Tag) *S3CopyObjectOperation { s.NewObjectTagging = v return s }
[ "func", "(", "s", "*", "S3CopyObjectOperation", ")", "SetNewObjectTagging", "(", "v", "[", "]", "*", "S3Tag", ")", "*", "S3CopyObjectOperation", "{", "s", ".", "NewObjectTagging", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetNewObjectTagging sets the NewObjectTagging field's value.
[ "SetNewObjectTagging", "sets", "the", "NewObjectTagging", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L2364-L2367
train
aws/aws-sdk-go
service/s3control/api.go
SetRedirectLocation
func (s *S3CopyObjectOperation) SetRedirectLocation(v string) *S3CopyObjectOperation { s.RedirectLocation = &v return s }
go
func (s *S3CopyObjectOperation) SetRedirectLocation(v string) *S3CopyObjectOperation { s.RedirectLocation = &v return s }
[ "func", "(", "s", "*", "S3CopyObjectOperation", ")", "SetRedirectLocation", "(", "v", "string", ")", "*", "S3CopyObjectOperation", "{", "s", ".", "RedirectLocation", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetRedirectLocation sets the RedirectLocation field's value.
[ "SetRedirectLocation", "sets", "the", "RedirectLocation", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L2388-L2391
train
aws/aws-sdk-go
service/s3control/api.go
SetSSEAwsKmsKeyId
func (s *S3CopyObjectOperation) SetSSEAwsKmsKeyId(v string) *S3CopyObjectOperation { s.SSEAwsKmsKeyId = &v return s }
go
func (s *S3CopyObjectOperation) SetSSEAwsKmsKeyId(v string) *S3CopyObjectOperation { s.SSEAwsKmsKeyId = &v return s }
[ "func", "(", "s", "*", "S3CopyObjectOperation", ")", "SetSSEAwsKmsKeyId", "(", "v", "string", ")", "*", "S3CopyObjectOperation", "{", "s", ".", "SSEAwsKmsKeyId", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetSSEAwsKmsKeyId sets the SSEAwsKmsKeyId field's value.
[ "SetSSEAwsKmsKeyId", "sets", "the", "SSEAwsKmsKeyId", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L2400-L2403
train
aws/aws-sdk-go
service/s3control/api.go
SetTargetKeyPrefix
func (s *S3CopyObjectOperation) SetTargetKeyPrefix(v string) *S3CopyObjectOperation { s.TargetKeyPrefix = &v return s }
go
func (s *S3CopyObjectOperation) SetTargetKeyPrefix(v string) *S3CopyObjectOperation { s.TargetKeyPrefix = &v return s }
[ "func", "(", "s", "*", "S3CopyObjectOperation", ")", "SetTargetKeyPrefix", "(", "v", "string", ")", "*", "S3CopyObjectOperation", "{", "s", ".", "TargetKeyPrefix", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetTargetKeyPrefix sets the TargetKeyPrefix field's value.
[ "SetTargetKeyPrefix", "sets", "the", "TargetKeyPrefix", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L2412-L2415
train
aws/aws-sdk-go
service/s3control/api.go
SetUnModifiedSinceConstraint
func (s *S3CopyObjectOperation) SetUnModifiedSinceConstraint(v time.Time) *S3CopyObjectOperation { s.UnModifiedSinceConstraint = &v return s }
go
func (s *S3CopyObjectOperation) SetUnModifiedSinceConstraint(v time.Time) *S3CopyObjectOperation { s.UnModifiedSinceConstraint = &v return s }
[ "func", "(", "s", "*", "S3CopyObjectOperation", ")", "SetUnModifiedSinceConstraint", "(", "v", "time", ".", "Time", ")", "*", "S3CopyObjectOperation", "{", "s", ".", "UnModifiedSinceConstraint", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetUnModifiedSinceConstraint sets the UnModifiedSinceConstraint field's value.
[ "SetUnModifiedSinceConstraint", "sets", "the", "UnModifiedSinceConstraint", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L2424-L2427
train
aws/aws-sdk-go
service/s3control/api.go
SetTypeIdentifier
func (s *S3Grantee) SetTypeIdentifier(v string) *S3Grantee { s.TypeIdentifier = &v return s }
go
func (s *S3Grantee) SetTypeIdentifier(v string) *S3Grantee { s.TypeIdentifier = &v return s }
[ "func", "(", "s", "*", "S3Grantee", ")", "SetTypeIdentifier", "(", "v", "string", ")", "*", "S3Grantee", "{", "s", ".", "TypeIdentifier", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetTypeIdentifier sets the TypeIdentifier field's value.
[ "SetTypeIdentifier", "sets", "the", "TypeIdentifier", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L2523-L2526
train
aws/aws-sdk-go
service/s3control/api.go
SetGlacierJobTier
func (s *S3InitiateRestoreObjectOperation) SetGlacierJobTier(v string) *S3InitiateRestoreObjectOperation { s.GlacierJobTier = &v return s }
go
func (s *S3InitiateRestoreObjectOperation) SetGlacierJobTier(v string) *S3InitiateRestoreObjectOperation { s.GlacierJobTier = &v return s }
[ "func", "(", "s", "*", "S3InitiateRestoreObjectOperation", ")", "SetGlacierJobTier", "(", "v", "string", ")", "*", "S3InitiateRestoreObjectOperation", "{", "s", ".", "GlacierJobTier", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetGlacierJobTier sets the GlacierJobTier field's value.
[ "SetGlacierJobTier", "sets", "the", "GlacierJobTier", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L2557-L2560
train
aws/aws-sdk-go
service/s3control/api.go
SetHttpExpiresDate
func (s *S3ObjectMetadata) SetHttpExpiresDate(v time.Time) *S3ObjectMetadata { s.HttpExpiresDate = &v return s }
go
func (s *S3ObjectMetadata) SetHttpExpiresDate(v time.Time) *S3ObjectMetadata { s.HttpExpiresDate = &v return s }
[ "func", "(", "s", "*", "S3ObjectMetadata", ")", "SetHttpExpiresDate", "(", "v", "time", ".", "Time", ")", "*", "S3ObjectMetadata", "{", "s", ".", "HttpExpiresDate", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetHttpExpiresDate sets the HttpExpiresDate field's value.
[ "SetHttpExpiresDate", "sets", "the", "HttpExpiresDate", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L2669-L2672
train
aws/aws-sdk-go
service/s3control/api.go
SetRequesterCharged
func (s *S3ObjectMetadata) SetRequesterCharged(v bool) *S3ObjectMetadata { s.RequesterCharged = &v return s }
go
func (s *S3ObjectMetadata) SetRequesterCharged(v bool) *S3ObjectMetadata { s.RequesterCharged = &v return s }
[ "func", "(", "s", "*", "S3ObjectMetadata", ")", "SetRequesterCharged", "(", "v", "bool", ")", "*", "S3ObjectMetadata", "{", "s", ".", "RequesterCharged", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetRequesterCharged sets the RequesterCharged field's value.
[ "SetRequesterCharged", "sets", "the", "RequesterCharged", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L2675-L2678
train
aws/aws-sdk-go
service/s3control/api.go
SetRequestedJobStatus
func (s *UpdateJobStatusInput) SetRequestedJobStatus(v string) *UpdateJobStatusInput { s.RequestedJobStatus = &v return s }
go
func (s *UpdateJobStatusInput) SetRequestedJobStatus(v string) *UpdateJobStatusInput { s.RequestedJobStatus = &v return s }
[ "func", "(", "s", "*", "UpdateJobStatusInput", ")", "SetRequestedJobStatus", "(", "v", "string", ")", "*", "UpdateJobStatusInput", "{", "s", ".", "RequestedJobStatus", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetRequestedJobStatus sets the RequestedJobStatus field's value.
[ "SetRequestedJobStatus", "sets", "the", "RequestedJobStatus", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3control/api.go#L3060-L3063
train
aws/aws-sdk-go
aws/ec2metadata/api.go
GetUserData
func (c *EC2Metadata) GetUserData() (string, error) { op := &request.Operation{ Name: "GetUserData", HTTPMethod: "GET", HTTPPath: "/user-data", } output := &metadataOutput{} req := c.NewRequest(op, nil, output) req.Handlers.UnmarshalError.PushBack(func(r *request.Request) { if r.HTTPResponse.StatusCode == http.StatusNotFound { r.Error = awserr.New("NotFoundError", "user-data not found", r.Error) } }) err := req.Send() return output.Content, err }
go
func (c *EC2Metadata) GetUserData() (string, error) { op := &request.Operation{ Name: "GetUserData", HTTPMethod: "GET", HTTPPath: "/user-data", } output := &metadataOutput{} req := c.NewRequest(op, nil, output) req.Handlers.UnmarshalError.PushBack(func(r *request.Request) { if r.HTTPResponse.StatusCode == http.StatusNotFound { r.Error = awserr.New("NotFoundError", "user-data not found", r.Error) } }) err := req.Send() return output.Content, err }
[ "func", "(", "c", "*", "EC2Metadata", ")", "GetUserData", "(", ")", "(", "string", ",", "error", ")", "{", "op", ":=", "&", "request", ".", "Operation", "{", "Name", ":", "\"", "\"", ",", "HTTPMethod", ":", "\"", "\"", ",", "HTTPPath", ":", "\"", "\"", ",", "}", "\n\n", "output", ":=", "&", "metadataOutput", "{", "}", "\n", "req", ":=", "c", ".", "NewRequest", "(", "op", ",", "nil", ",", "output", ")", "\n", "req", ".", "Handlers", ".", "UnmarshalError", ".", "PushBack", "(", "func", "(", "r", "*", "request", ".", "Request", ")", "{", "if", "r", ".", "HTTPResponse", ".", "StatusCode", "==", "http", ".", "StatusNotFound", "{", "r", ".", "Error", "=", "awserr", ".", "New", "(", "\"", "\"", ",", "\"", "\"", ",", "r", ".", "Error", ")", "\n", "}", "\n", "}", ")", "\n", "err", ":=", "req", ".", "Send", "(", ")", "\n\n", "return", "output", ".", "Content", ",", "err", "\n", "}" ]
// GetUserData returns the userdata that was configured for the service. If // there is no user-data setup for the EC2 instance a "NotFoundError" error // code will be returned.
[ "GetUserData", "returns", "the", "userdata", "that", "was", "configured", "for", "the", "service", ".", "If", "there", "is", "no", "user", "-", "data", "setup", "for", "the", "EC2", "instance", "a", "NotFoundError", "error", "code", "will", "be", "returned", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/ec2metadata/api.go#L35-L52
train
aws/aws-sdk-go
aws/ec2metadata/api.go
GetDynamicData
func (c *EC2Metadata) GetDynamicData(p string) (string, error) { op := &request.Operation{ Name: "GetDynamicData", HTTPMethod: "GET", HTTPPath: sdkuri.PathJoin("/dynamic", p), } output := &metadataOutput{} req := c.NewRequest(op, nil, output) err := req.Send() return output.Content, err }
go
func (c *EC2Metadata) GetDynamicData(p string) (string, error) { op := &request.Operation{ Name: "GetDynamicData", HTTPMethod: "GET", HTTPPath: sdkuri.PathJoin("/dynamic", p), } output := &metadataOutput{} req := c.NewRequest(op, nil, output) err := req.Send() return output.Content, err }
[ "func", "(", "c", "*", "EC2Metadata", ")", "GetDynamicData", "(", "p", "string", ")", "(", "string", ",", "error", ")", "{", "op", ":=", "&", "request", ".", "Operation", "{", "Name", ":", "\"", "\"", ",", "HTTPMethod", ":", "\"", "\"", ",", "HTTPPath", ":", "sdkuri", ".", "PathJoin", "(", "\"", "\"", ",", "p", ")", ",", "}", "\n\n", "output", ":=", "&", "metadataOutput", "{", "}", "\n", "req", ":=", "c", ".", "NewRequest", "(", "op", ",", "nil", ",", "output", ")", "\n", "err", ":=", "req", ".", "Send", "(", ")", "\n\n", "return", "output", ".", "Content", ",", "err", "\n", "}" ]
// GetDynamicData uses the path provided to request information from the EC2 // instance metadata service for dynamic data. The content will be returned // as a string, or error if the request failed.
[ "GetDynamicData", "uses", "the", "path", "provided", "to", "request", "information", "from", "the", "EC2", "instance", "metadata", "service", "for", "dynamic", "data", ".", "The", "content", "will", "be", "returned", "as", "a", "string", "or", "error", "if", "the", "request", "failed", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/ec2metadata/api.go#L57-L69
train
aws/aws-sdk-go
aws/ec2metadata/api.go
GetInstanceIdentityDocument
func (c *EC2Metadata) GetInstanceIdentityDocument() (EC2InstanceIdentityDocument, error) { resp, err := c.GetDynamicData("instance-identity/document") if err != nil { return EC2InstanceIdentityDocument{}, awserr.New("EC2MetadataRequestError", "failed to get EC2 instance identity document", err) } doc := EC2InstanceIdentityDocument{} if err := json.NewDecoder(strings.NewReader(resp)).Decode(&doc); err != nil { return EC2InstanceIdentityDocument{}, awserr.New("SerializationError", "failed to decode EC2 instance identity document", err) } return doc, nil }
go
func (c *EC2Metadata) GetInstanceIdentityDocument() (EC2InstanceIdentityDocument, error) { resp, err := c.GetDynamicData("instance-identity/document") if err != nil { return EC2InstanceIdentityDocument{}, awserr.New("EC2MetadataRequestError", "failed to get EC2 instance identity document", err) } doc := EC2InstanceIdentityDocument{} if err := json.NewDecoder(strings.NewReader(resp)).Decode(&doc); err != nil { return EC2InstanceIdentityDocument{}, awserr.New("SerializationError", "failed to decode EC2 instance identity document", err) } return doc, nil }
[ "func", "(", "c", "*", "EC2Metadata", ")", "GetInstanceIdentityDocument", "(", ")", "(", "EC2InstanceIdentityDocument", ",", "error", ")", "{", "resp", ",", "err", ":=", "c", ".", "GetDynamicData", "(", "\"", "\"", ")", "\n", "if", "err", "!=", "nil", "{", "return", "EC2InstanceIdentityDocument", "{", "}", ",", "awserr", ".", "New", "(", "\"", "\"", ",", "\"", "\"", ",", "err", ")", "\n", "}", "\n\n", "doc", ":=", "EC2InstanceIdentityDocument", "{", "}", "\n", "if", "err", ":=", "json", ".", "NewDecoder", "(", "strings", ".", "NewReader", "(", "resp", ")", ")", ".", "Decode", "(", "&", "doc", ")", ";", "err", "!=", "nil", "{", "return", "EC2InstanceIdentityDocument", "{", "}", ",", "awserr", ".", "New", "(", "\"", "\"", ",", "\"", "\"", ",", "err", ")", "\n", "}", "\n\n", "return", "doc", ",", "nil", "\n", "}" ]
// GetInstanceIdentityDocument retrieves an identity document describing an // instance. Error is returned if the request fails or is unable to parse // the response.
[ "GetInstanceIdentityDocument", "retrieves", "an", "identity", "document", "describing", "an", "instance", ".", "Error", "is", "returned", "if", "the", "request", "fails", "or", "is", "unable", "to", "parse", "the", "response", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/ec2metadata/api.go#L74-L90
train
aws/aws-sdk-go
aws/ec2metadata/api.go
IAMInfo
func (c *EC2Metadata) IAMInfo() (EC2IAMInfo, error) { resp, err := c.GetMetadata("iam/info") if err != nil { return EC2IAMInfo{}, awserr.New("EC2MetadataRequestError", "failed to get EC2 IAM info", err) } info := EC2IAMInfo{} if err := json.NewDecoder(strings.NewReader(resp)).Decode(&info); err != nil { return EC2IAMInfo{}, awserr.New("SerializationError", "failed to decode EC2 IAM info", err) } if info.Code != "Success" { errMsg := fmt.Sprintf("failed to get EC2 IAM Info (%s)", info.Code) return EC2IAMInfo{}, awserr.New("EC2MetadataError", errMsg, nil) } return info, nil }
go
func (c *EC2Metadata) IAMInfo() (EC2IAMInfo, error) { resp, err := c.GetMetadata("iam/info") if err != nil { return EC2IAMInfo{}, awserr.New("EC2MetadataRequestError", "failed to get EC2 IAM info", err) } info := EC2IAMInfo{} if err := json.NewDecoder(strings.NewReader(resp)).Decode(&info); err != nil { return EC2IAMInfo{}, awserr.New("SerializationError", "failed to decode EC2 IAM info", err) } if info.Code != "Success" { errMsg := fmt.Sprintf("failed to get EC2 IAM Info (%s)", info.Code) return EC2IAMInfo{}, awserr.New("EC2MetadataError", errMsg, nil) } return info, nil }
[ "func", "(", "c", "*", "EC2Metadata", ")", "IAMInfo", "(", ")", "(", "EC2IAMInfo", ",", "error", ")", "{", "resp", ",", "err", ":=", "c", ".", "GetMetadata", "(", "\"", "\"", ")", "\n", "if", "err", "!=", "nil", "{", "return", "EC2IAMInfo", "{", "}", ",", "awserr", ".", "New", "(", "\"", "\"", ",", "\"", "\"", ",", "err", ")", "\n", "}", "\n\n", "info", ":=", "EC2IAMInfo", "{", "}", "\n", "if", "err", ":=", "json", ".", "NewDecoder", "(", "strings", ".", "NewReader", "(", "resp", ")", ")", ".", "Decode", "(", "&", "info", ")", ";", "err", "!=", "nil", "{", "return", "EC2IAMInfo", "{", "}", ",", "awserr", ".", "New", "(", "\"", "\"", ",", "\"", "\"", ",", "err", ")", "\n", "}", "\n\n", "if", "info", ".", "Code", "!=", "\"", "\"", "{", "errMsg", ":=", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "info", ".", "Code", ")", "\n", "return", "EC2IAMInfo", "{", "}", ",", "awserr", ".", "New", "(", "\"", "\"", ",", "errMsg", ",", "nil", ")", "\n", "}", "\n\n", "return", "info", ",", "nil", "\n", "}" ]
// IAMInfo retrieves IAM info from the metadata API
[ "IAMInfo", "retrieves", "IAM", "info", "from", "the", "metadata", "API" ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/ec2metadata/api.go#L93-L115
train
aws/aws-sdk-go
aws/ec2metadata/api.go
Region
func (c *EC2Metadata) Region() (string, error) { resp, err := c.GetMetadata("placement/availability-zone") if err != nil { return "", err } if len(resp) == 0 { return "", awserr.New("EC2MetadataError", "invalid Region response", nil) } // returns region without the suffix. Eg: us-west-2a becomes us-west-2 return resp[:len(resp)-1], nil }
go
func (c *EC2Metadata) Region() (string, error) { resp, err := c.GetMetadata("placement/availability-zone") if err != nil { return "", err } if len(resp) == 0 { return "", awserr.New("EC2MetadataError", "invalid Region response", nil) } // returns region without the suffix. Eg: us-west-2a becomes us-west-2 return resp[:len(resp)-1], nil }
[ "func", "(", "c", "*", "EC2Metadata", ")", "Region", "(", ")", "(", "string", ",", "error", ")", "{", "resp", ",", "err", ":=", "c", ".", "GetMetadata", "(", "\"", "\"", ")", "\n", "if", "err", "!=", "nil", "{", "return", "\"", "\"", ",", "err", "\n", "}", "\n\n", "if", "len", "(", "resp", ")", "==", "0", "{", "return", "\"", "\"", ",", "awserr", ".", "New", "(", "\"", "\"", ",", "\"", "\"", ",", "nil", ")", "\n", "}", "\n\n", "// returns region without the suffix. Eg: us-west-2a becomes us-west-2", "return", "resp", "[", ":", "len", "(", "resp", ")", "-", "1", "]", ",", "nil", "\n", "}" ]
// Region returns the region the instance is running in.
[ "Region", "returns", "the", "region", "the", "instance", "is", "running", "in", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/ec2metadata/api.go#L118-L130
train
aws/aws-sdk-go
aws/ec2metadata/api.go
Available
func (c *EC2Metadata) Available() bool { if _, err := c.GetMetadata("instance-id"); err != nil { return false } return true }
go
func (c *EC2Metadata) Available() bool { if _, err := c.GetMetadata("instance-id"); err != nil { return false } return true }
[ "func", "(", "c", "*", "EC2Metadata", ")", "Available", "(", ")", "bool", "{", "if", "_", ",", "err", ":=", "c", ".", "GetMetadata", "(", "\"", "\"", ")", ";", "err", "!=", "nil", "{", "return", "false", "\n", "}", "\n\n", "return", "true", "\n", "}" ]
// Available returns if the application has access to the EC2 Metadata service. // Can be used to determine if application is running within an EC2 Instance and // the metadata service is available.
[ "Available", "returns", "if", "the", "application", "has", "access", "to", "the", "EC2", "Metadata", "service", ".", "Can", "be", "used", "to", "determine", "if", "application", "is", "running", "within", "an", "EC2", "Instance", "and", "the", "metadata", "service", "is", "available", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/ec2metadata/api.go#L135-L141
train
aws/aws-sdk-go
service/medialive/api.go
SetInputType
func (s *AacSettings) SetInputType(v string) *AacSettings { s.InputType = &v return s }
go
func (s *AacSettings) SetInputType(v string) *AacSettings { s.InputType = &v return s }
[ "func", "(", "s", "*", "AacSettings", ")", "SetInputType", "(", "v", "string", ")", "*", "AacSettings", "{", "s", ".", "InputType", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetInputType sets the InputType field's value.
[ "SetInputType", "sets", "the", "InputType", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L3018-L3021
train
aws/aws-sdk-go
service/medialive/api.go
SetDrcProfile
func (s *Ac3Settings) SetDrcProfile(v string) *Ac3Settings { s.DrcProfile = &v return s }
go
func (s *Ac3Settings) SetDrcProfile(v string) *Ac3Settings { s.DrcProfile = &v return s }
[ "func", "(", "s", "*", "Ac3Settings", ")", "SetDrcProfile", "(", "v", "string", ")", "*", "Ac3Settings", "{", "s", ".", "DrcProfile", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetDrcProfile sets the DrcProfile field's value.
[ "SetDrcProfile", "sets", "the", "DrcProfile", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L3139-L3142
train
aws/aws-sdk-go
service/medialive/api.go
SetRolloverInterval
func (s *ArchiveGroupSettings) SetRolloverInterval(v int64) *ArchiveGroupSettings { s.RolloverInterval = &v return s }
go
func (s *ArchiveGroupSettings) SetRolloverInterval(v int64) *ArchiveGroupSettings { s.RolloverInterval = &v return s }
[ "func", "(", "s", "*", "ArchiveGroupSettings", ")", "SetRolloverInterval", "(", "v", "int64", ")", "*", "ArchiveGroupSettings", "{", "s", ".", "RolloverInterval", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetRolloverInterval sets the RolloverInterval field's value.
[ "SetRolloverInterval", "sets", "the", "RolloverInterval", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L3242-L3245
train
aws/aws-sdk-go
service/medialive/api.go
SetInputChannelLevels
func (s *AudioChannelMapping) SetInputChannelLevels(v []*InputChannelLevel) *AudioChannelMapping { s.InputChannelLevels = v return s }
go
func (s *AudioChannelMapping) SetInputChannelLevels(v []*InputChannelLevel) *AudioChannelMapping { s.InputChannelLevels = v return s }
[ "func", "(", "s", "*", "AudioChannelMapping", ")", "SetInputChannelLevels", "(", "v", "[", "]", "*", "InputChannelLevel", ")", "*", "AudioChannelMapping", "{", "s", ".", "InputChannelLevels", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetInputChannelLevels sets the InputChannelLevels field's value.
[ "SetInputChannelLevels", "sets", "the", "InputChannelLevels", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L3394-L3397
train
aws/aws-sdk-go
service/medialive/api.go
SetOutputChannel
func (s *AudioChannelMapping) SetOutputChannel(v int64) *AudioChannelMapping { s.OutputChannel = &v return s }
go
func (s *AudioChannelMapping) SetOutputChannel(v int64) *AudioChannelMapping { s.OutputChannel = &v return s }
[ "func", "(", "s", "*", "AudioChannelMapping", ")", "SetOutputChannel", "(", "v", "int64", ")", "*", "AudioChannelMapping", "{", "s", ".", "OutputChannel", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetOutputChannel sets the OutputChannel field's value.
[ "SetOutputChannel", "sets", "the", "OutputChannel", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L3400-L3403
train
aws/aws-sdk-go
service/medialive/api.go
SetPassThroughSettings
func (s *AudioCodecSettings) SetPassThroughSettings(v *PassThroughSettings) *AudioCodecSettings { s.PassThroughSettings = v return s }
go
func (s *AudioCodecSettings) SetPassThroughSettings(v *PassThroughSettings) *AudioCodecSettings { s.PassThroughSettings = v return s }
[ "func", "(", "s", "*", "AudioCodecSettings", ")", "SetPassThroughSettings", "(", "v", "*", "PassThroughSettings", ")", "*", "AudioCodecSettings", "{", "s", ".", "PassThroughSettings", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetPassThroughSettings sets the PassThroughSettings field's value.
[ "SetPassThroughSettings", "sets", "the", "PassThroughSettings", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L3480-L3483
train
aws/aws-sdk-go
service/medialive/api.go
SetAudioSelectorName
func (s *AudioDescription) SetAudioSelectorName(v string) *AudioDescription { s.AudioSelectorName = &v return s }
go
func (s *AudioDescription) SetAudioSelectorName(v string) *AudioDescription { s.AudioSelectorName = &v return s }
[ "func", "(", "s", "*", "AudioDescription", ")", "SetAudioSelectorName", "(", "v", "string", ")", "*", "AudioDescription", "{", "s", ".", "AudioSelectorName", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetAudioSelectorName sets the AudioSelectorName field's value.
[ "SetAudioSelectorName", "sets", "the", "AudioSelectorName", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L3584-L3587
train
aws/aws-sdk-go
service/medialive/api.go
SetLanguageSelectionPolicy
func (s *AudioLanguageSelection) SetLanguageSelectionPolicy(v string) *AudioLanguageSelection { s.LanguageSelectionPolicy = &v return s }
go
func (s *AudioLanguageSelection) SetLanguageSelectionPolicy(v string) *AudioLanguageSelection { s.LanguageSelectionPolicy = &v return s }
[ "func", "(", "s", "*", "AudioLanguageSelection", ")", "SetLanguageSelectionPolicy", "(", "v", "string", ")", "*", "AudioLanguageSelection", "{", "s", ".", "LanguageSelectionPolicy", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetLanguageSelectionPolicy sets the LanguageSelectionPolicy field's value.
[ "SetLanguageSelectionPolicy", "sets", "the", "LanguageSelectionPolicy", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L3685-L3688
train
aws/aws-sdk-go
service/medialive/api.go
SetAudioOnlyImage
func (s *AudioOnlyHlsSettings) SetAudioOnlyImage(v *InputLocation) *AudioOnlyHlsSettings { s.AudioOnlyImage = v return s }
go
func (s *AudioOnlyHlsSettings) SetAudioOnlyImage(v *InputLocation) *AudioOnlyHlsSettings { s.AudioOnlyImage = v return s }
[ "func", "(", "s", "*", "AudioOnlyHlsSettings", ")", "SetAudioOnlyImage", "(", "v", "*", "InputLocation", ")", "*", "AudioOnlyHlsSettings", "{", "s", ".", "AudioOnlyImage", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetAudioOnlyImage sets the AudioOnlyImage field's value.
[ "SetAudioOnlyImage", "sets", "the", "AudioOnlyImage", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L3799-L3802
train
aws/aws-sdk-go
service/medialive/api.go
SetAudioLanguageSelection
func (s *AudioSelectorSettings) SetAudioLanguageSelection(v *AudioLanguageSelection) *AudioSelectorSettings { s.AudioLanguageSelection = v return s }
go
func (s *AudioSelectorSettings) SetAudioLanguageSelection(v *AudioLanguageSelection) *AudioSelectorSettings { s.AudioLanguageSelection = v return s }
[ "func", "(", "s", "*", "AudioSelectorSettings", ")", "SetAudioLanguageSelection", "(", "v", "*", "AudioLanguageSelection", ")", "*", "AudioSelectorSettings", "{", "s", ".", "AudioLanguageSelection", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetAudioLanguageSelection sets the AudioLanguageSelection field's value.
[ "SetAudioLanguageSelection", "sets", "the", "AudioLanguageSelection", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L3948-L3951
train
aws/aws-sdk-go
service/medialive/api.go
SetAudioPidSelection
func (s *AudioSelectorSettings) SetAudioPidSelection(v *AudioPidSelection) *AudioSelectorSettings { s.AudioPidSelection = v return s }
go
func (s *AudioSelectorSettings) SetAudioPidSelection(v *AudioPidSelection) *AudioSelectorSettings { s.AudioPidSelection = v return s }
[ "func", "(", "s", "*", "AudioSelectorSettings", ")", "SetAudioPidSelection", "(", "v", "*", "AudioPidSelection", ")", "*", "AudioSelectorSettings", "{", "s", ".", "AudioPidSelection", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetAudioPidSelection sets the AudioPidSelection field's value.
[ "SetAudioPidSelection", "sets", "the", "AudioPidSelection", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L3954-L3957
train
aws/aws-sdk-go
service/medialive/api.go
SetAvailSettings
func (s *AvailConfiguration) SetAvailSettings(v *AvailSettings) *AvailConfiguration { s.AvailSettings = v return s }
go
func (s *AvailConfiguration) SetAvailSettings(v *AvailSettings) *AvailConfiguration { s.AvailSettings = v return s }
[ "func", "(", "s", "*", "AvailConfiguration", ")", "SetAvailSettings", "(", "v", "*", "AvailSettings", ")", "*", "AvailConfiguration", "{", "s", ".", "AvailSettings", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetAvailSettings sets the AvailSettings field's value.
[ "SetAvailSettings", "sets", "the", "AvailSettings", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L4043-L4046
train
aws/aws-sdk-go
service/medialive/api.go
SetScte35SpliceInsert
func (s *AvailSettings) SetScte35SpliceInsert(v *Scte35SpliceInsert) *AvailSettings { s.Scte35SpliceInsert = v return s }
go
func (s *AvailSettings) SetScte35SpliceInsert(v *Scte35SpliceInsert) *AvailSettings { s.Scte35SpliceInsert = v return s }
[ "func", "(", "s", "*", "AvailSettings", ")", "SetScte35SpliceInsert", "(", "v", "*", "Scte35SpliceInsert", ")", "*", "AvailSettings", "{", "s", ".", "Scte35SpliceInsert", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetScte35SpliceInsert sets the Scte35SpliceInsert field's value.
[ "SetScte35SpliceInsert", "sets", "the", "Scte35SpliceInsert", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L4090-L4093
train
aws/aws-sdk-go
service/medialive/api.go
SetScte35TimeSignalApos
func (s *AvailSettings) SetScte35TimeSignalApos(v *Scte35TimeSignalApos) *AvailSettings { s.Scte35TimeSignalApos = v return s }
go
func (s *AvailSettings) SetScte35TimeSignalApos(v *Scte35TimeSignalApos) *AvailSettings { s.Scte35TimeSignalApos = v return s }
[ "func", "(", "s", "*", "AvailSettings", ")", "SetScte35TimeSignalApos", "(", "v", "*", "Scte35TimeSignalApos", ")", "*", "AvailSettings", "{", "s", ".", "Scte35TimeSignalApos", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetScte35TimeSignalApos sets the Scte35TimeSignalApos field's value.
[ "SetScte35TimeSignalApos", "sets", "the", "Scte35TimeSignalApos", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L4096-L4099
train
aws/aws-sdk-go
service/medialive/api.go
SetBlackoutSlateImage
func (s *BlackoutSlate) SetBlackoutSlateImage(v *InputLocation) *BlackoutSlate { s.BlackoutSlateImage = v return s }
go
func (s *BlackoutSlate) SetBlackoutSlateImage(v *InputLocation) *BlackoutSlate { s.BlackoutSlateImage = v return s }
[ "func", "(", "s", "*", "BlackoutSlate", ")", "SetBlackoutSlateImage", "(", "v", "*", "InputLocation", ")", "*", "BlackoutSlate", "{", "s", ".", "BlackoutSlateImage", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetBlackoutSlateImage sets the BlackoutSlateImage field's value.
[ "SetBlackoutSlateImage", "sets", "the", "BlackoutSlateImage", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L4405-L4408
train
aws/aws-sdk-go
service/medialive/api.go
SetNetworkEndBlackout
func (s *BlackoutSlate) SetNetworkEndBlackout(v string) *BlackoutSlate { s.NetworkEndBlackout = &v return s }
go
func (s *BlackoutSlate) SetNetworkEndBlackout(v string) *BlackoutSlate { s.NetworkEndBlackout = &v return s }
[ "func", "(", "s", "*", "BlackoutSlate", ")", "SetNetworkEndBlackout", "(", "v", "string", ")", "*", "BlackoutSlate", "{", "s", ".", "NetworkEndBlackout", "=", "&", "v", "\n", "return", "s", "\n", "}" ]
// SetNetworkEndBlackout sets the NetworkEndBlackout field's value.
[ "SetNetworkEndBlackout", "sets", "the", "NetworkEndBlackout", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L4411-L4414
train
aws/aws-sdk-go
service/medialive/api.go
SetNetworkEndBlackoutImage
func (s *BlackoutSlate) SetNetworkEndBlackoutImage(v *InputLocation) *BlackoutSlate { s.NetworkEndBlackoutImage = v return s }
go
func (s *BlackoutSlate) SetNetworkEndBlackoutImage(v *InputLocation) *BlackoutSlate { s.NetworkEndBlackoutImage = v return s }
[ "func", "(", "s", "*", "BlackoutSlate", ")", "SetNetworkEndBlackoutImage", "(", "v", "*", "InputLocation", ")", "*", "BlackoutSlate", "{", "s", ".", "NetworkEndBlackoutImage", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetNetworkEndBlackoutImage sets the NetworkEndBlackoutImage field's value.
[ "SetNetworkEndBlackoutImage", "sets", "the", "NetworkEndBlackoutImage", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L4417-L4420
train
aws/aws-sdk-go
service/medialive/api.go
SetAribDestinationSettings
func (s *CaptionDestinationSettings) SetAribDestinationSettings(v *AribDestinationSettings) *CaptionDestinationSettings { s.AribDestinationSettings = v return s }
go
func (s *CaptionDestinationSettings) SetAribDestinationSettings(v *AribDestinationSettings) *CaptionDestinationSettings { s.AribDestinationSettings = v return s }
[ "func", "(", "s", "*", "CaptionDestinationSettings", ")", "SetAribDestinationSettings", "(", "v", "*", "AribDestinationSettings", ")", "*", "CaptionDestinationSettings", "{", "s", ".", "AribDestinationSettings", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetAribDestinationSettings sets the AribDestinationSettings field's value.
[ "SetAribDestinationSettings", "sets", "the", "AribDestinationSettings", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L4824-L4827
train
aws/aws-sdk-go
service/medialive/api.go
SetBurnInDestinationSettings
func (s *CaptionDestinationSettings) SetBurnInDestinationSettings(v *BurnInDestinationSettings) *CaptionDestinationSettings { s.BurnInDestinationSettings = v return s }
go
func (s *CaptionDestinationSettings) SetBurnInDestinationSettings(v *BurnInDestinationSettings) *CaptionDestinationSettings { s.BurnInDestinationSettings = v return s }
[ "func", "(", "s", "*", "CaptionDestinationSettings", ")", "SetBurnInDestinationSettings", "(", "v", "*", "BurnInDestinationSettings", ")", "*", "CaptionDestinationSettings", "{", "s", ".", "BurnInDestinationSettings", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetBurnInDestinationSettings sets the BurnInDestinationSettings field's value.
[ "SetBurnInDestinationSettings", "sets", "the", "BurnInDestinationSettings", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L4830-L4833
train
aws/aws-sdk-go
service/medialive/api.go
SetEmbeddedPlusScte20DestinationSettings
func (s *CaptionDestinationSettings) SetEmbeddedPlusScte20DestinationSettings(v *EmbeddedPlusScte20DestinationSettings) *CaptionDestinationSettings { s.EmbeddedPlusScte20DestinationSettings = v return s }
go
func (s *CaptionDestinationSettings) SetEmbeddedPlusScte20DestinationSettings(v *EmbeddedPlusScte20DestinationSettings) *CaptionDestinationSettings { s.EmbeddedPlusScte20DestinationSettings = v return s }
[ "func", "(", "s", "*", "CaptionDestinationSettings", ")", "SetEmbeddedPlusScte20DestinationSettings", "(", "v", "*", "EmbeddedPlusScte20DestinationSettings", ")", "*", "CaptionDestinationSettings", "{", "s", ".", "EmbeddedPlusScte20DestinationSettings", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetEmbeddedPlusScte20DestinationSettings sets the EmbeddedPlusScte20DestinationSettings field's value.
[ "SetEmbeddedPlusScte20DestinationSettings", "sets", "the", "EmbeddedPlusScte20DestinationSettings", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L4848-L4851
train
aws/aws-sdk-go
service/medialive/api.go
SetRtmpCaptionInfoDestinationSettings
func (s *CaptionDestinationSettings) SetRtmpCaptionInfoDestinationSettings(v *RtmpCaptionInfoDestinationSettings) *CaptionDestinationSettings { s.RtmpCaptionInfoDestinationSettings = v return s }
go
func (s *CaptionDestinationSettings) SetRtmpCaptionInfoDestinationSettings(v *RtmpCaptionInfoDestinationSettings) *CaptionDestinationSettings { s.RtmpCaptionInfoDestinationSettings = v return s }
[ "func", "(", "s", "*", "CaptionDestinationSettings", ")", "SetRtmpCaptionInfoDestinationSettings", "(", "v", "*", "RtmpCaptionInfoDestinationSettings", ")", "*", "CaptionDestinationSettings", "{", "s", ".", "RtmpCaptionInfoDestinationSettings", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetRtmpCaptionInfoDestinationSettings sets the RtmpCaptionInfoDestinationSettings field's value.
[ "SetRtmpCaptionInfoDestinationSettings", "sets", "the", "RtmpCaptionInfoDestinationSettings", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L4854-L4857
train
aws/aws-sdk-go
service/medialive/api.go
SetScte20PlusEmbeddedDestinationSettings
func (s *CaptionDestinationSettings) SetScte20PlusEmbeddedDestinationSettings(v *Scte20PlusEmbeddedDestinationSettings) *CaptionDestinationSettings { s.Scte20PlusEmbeddedDestinationSettings = v return s }
go
func (s *CaptionDestinationSettings) SetScte20PlusEmbeddedDestinationSettings(v *Scte20PlusEmbeddedDestinationSettings) *CaptionDestinationSettings { s.Scte20PlusEmbeddedDestinationSettings = v return s }
[ "func", "(", "s", "*", "CaptionDestinationSettings", ")", "SetScte20PlusEmbeddedDestinationSettings", "(", "v", "*", "Scte20PlusEmbeddedDestinationSettings", ")", "*", "CaptionDestinationSettings", "{", "s", ".", "Scte20PlusEmbeddedDestinationSettings", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetScte20PlusEmbeddedDestinationSettings sets the Scte20PlusEmbeddedDestinationSettings field's value.
[ "SetScte20PlusEmbeddedDestinationSettings", "sets", "the", "Scte20PlusEmbeddedDestinationSettings", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L4860-L4863
train
aws/aws-sdk-go
service/medialive/api.go
SetScte27DestinationSettings
func (s *CaptionDestinationSettings) SetScte27DestinationSettings(v *Scte27DestinationSettings) *CaptionDestinationSettings { s.Scte27DestinationSettings = v return s }
go
func (s *CaptionDestinationSettings) SetScte27DestinationSettings(v *Scte27DestinationSettings) *CaptionDestinationSettings { s.Scte27DestinationSettings = v return s }
[ "func", "(", "s", "*", "CaptionDestinationSettings", ")", "SetScte27DestinationSettings", "(", "v", "*", "Scte27DestinationSettings", ")", "*", "CaptionDestinationSettings", "{", "s", ".", "Scte27DestinationSettings", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetScte27DestinationSettings sets the Scte27DestinationSettings field's value.
[ "SetScte27DestinationSettings", "sets", "the", "Scte27DestinationSettings", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L4866-L4869
train
aws/aws-sdk-go
service/medialive/api.go
SetSmpteTtDestinationSettings
func (s *CaptionDestinationSettings) SetSmpteTtDestinationSettings(v *SmpteTtDestinationSettings) *CaptionDestinationSettings { s.SmpteTtDestinationSettings = v return s }
go
func (s *CaptionDestinationSettings) SetSmpteTtDestinationSettings(v *SmpteTtDestinationSettings) *CaptionDestinationSettings { s.SmpteTtDestinationSettings = v return s }
[ "func", "(", "s", "*", "CaptionDestinationSettings", ")", "SetSmpteTtDestinationSettings", "(", "v", "*", "SmpteTtDestinationSettings", ")", "*", "CaptionDestinationSettings", "{", "s", ".", "SmpteTtDestinationSettings", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetSmpteTtDestinationSettings sets the SmpteTtDestinationSettings field's value.
[ "SetSmpteTtDestinationSettings", "sets", "the", "SmpteTtDestinationSettings", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L4872-L4875
train
aws/aws-sdk-go
service/medialive/api.go
SetWebvttDestinationSettings
func (s *CaptionDestinationSettings) SetWebvttDestinationSettings(v *WebvttDestinationSettings) *CaptionDestinationSettings { s.WebvttDestinationSettings = v return s }
go
func (s *CaptionDestinationSettings) SetWebvttDestinationSettings(v *WebvttDestinationSettings) *CaptionDestinationSettings { s.WebvttDestinationSettings = v return s }
[ "func", "(", "s", "*", "CaptionDestinationSettings", ")", "SetWebvttDestinationSettings", "(", "v", "*", "WebvttDestinationSettings", ")", "*", "CaptionDestinationSettings", "{", "s", ".", "WebvttDestinationSettings", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetWebvttDestinationSettings sets the WebvttDestinationSettings field's value.
[ "SetWebvttDestinationSettings", "sets", "the", "WebvttDestinationSettings", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L4890-L4893
train
aws/aws-sdk-go
service/medialive/api.go
SetAribSourceSettings
func (s *CaptionSelectorSettings) SetAribSourceSettings(v *AribSourceSettings) *CaptionSelectorSettings { s.AribSourceSettings = v return s }
go
func (s *CaptionSelectorSettings) SetAribSourceSettings(v *AribSourceSettings) *CaptionSelectorSettings { s.AribSourceSettings = v return s }
[ "func", "(", "s", "*", "CaptionSelectorSettings", ")", "SetAribSourceSettings", "(", "v", "*", "AribSourceSettings", ")", "*", "CaptionSelectorSettings", "{", "s", ".", "AribSourceSettings", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetAribSourceSettings sets the AribSourceSettings field's value.
[ "SetAribSourceSettings", "sets", "the", "AribSourceSettings", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L5106-L5109
train
aws/aws-sdk-go
service/medialive/api.go
SetScte20SourceSettings
func (s *CaptionSelectorSettings) SetScte20SourceSettings(v *Scte20SourceSettings) *CaptionSelectorSettings { s.Scte20SourceSettings = v return s }
go
func (s *CaptionSelectorSettings) SetScte20SourceSettings(v *Scte20SourceSettings) *CaptionSelectorSettings { s.Scte20SourceSettings = v return s }
[ "func", "(", "s", "*", "CaptionSelectorSettings", ")", "SetScte20SourceSettings", "(", "v", "*", "Scte20SourceSettings", ")", "*", "CaptionSelectorSettings", "{", "s", ".", "Scte20SourceSettings", "=", "v", "\n", "return", "s", "\n", "}" ]
// SetScte20SourceSettings sets the Scte20SourceSettings field's value.
[ "SetScte20SourceSettings", "sets", "the", "Scte20SourceSettings", "field", "s", "value", "." ]
6c4060605190fc6f00d63cd4e5572faa9f07345d
https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/medialive/api.go#L5124-L5127
train