_id
stringlengths
2
7
title
stringlengths
1
118
partition
stringclasses
3 values
text
stringlengths
17
51.2k
language
stringclasses
1 value
meta_information
dict
c500
SetHasFlaggedResources
train
{ s.HasFlaggedResources = &v return s }
go
{ "resource": "" }
c501
SetEstimatedMonthlySavings
train
float64) *TrustedAdvisorCostOptimizingSummary { s.EstimatedMonthlySavings = &v return s }
go
{ "resource": "" }
c502
SetEstimatedPercentMonthlySavings
train
float64) *TrustedAdvisorCostOptimizingSummary { s.EstimatedPercentMonthlySavings = &v return s }
go
{ "resource": "" }
c503
SetIsSuppressed
train
bool) *TrustedAdvisorResourceDetail { s.IsSuppressed = &v return s }
go
{ "resource": "" }
c504
SetResourcesFlagged
train
int64) *TrustedAdvisorResourcesSummary { s.ResourcesFlagged = &v return s }
go
{ "resource": "" }
c505
SetResourcesIgnored
train
int64) *TrustedAdvisorResourcesSummary { s.ResourcesIgnored = &v return s }
go
{ "resource": "" }
c506
SetResourcesProcessed
train
int64) *TrustedAdvisorResourcesSummary { s.ResourcesProcessed = &v return s }
go
{ "resource": "" }
c507
SetResourcesSuppressed
train
int64) *TrustedAdvisorResourcesSummary { s.ResourcesSuppressed = &v return s }
go
{ "resource": "" }
c508
GoFmt
train
code:\n%s", err.Error(), buf)) } return string(formatted) }
go
{ "resource": "" }
c509
Capitalize
train
{ return strings.ToUpper(s) } return strings.ToUpper(s[0:1]) + s[1:] }
go
{ "resource": "" }
c510
SortXML
train
_ := xmlutil.XMLToStruct(d, nil) e := xml.NewEncoder(&buf) xmlutil.StructToXML(e, root, true) return buf.String() }
go
{ "resource": "" }
c511
PrettyPrint
train
"map[" + fullName(value.Type().Key()) + "]" + fullName(value.Type().Elem()) + "{\n" for _, k := range value.MapKeys() { str += "\"" + k.String() + "\": " str += PrettyPrint(value.MapIndex(k).Interface()) str += ",\n" } str += "}" return str case reflect.Ptr: if e := value.Elem(); e.IsValid() { r...
go
{ "resource": "" }
c512
SetForceDeleteWithoutRecovery
train
s.ForceDeleteWithoutRecovery = &v return s }
go
{ "resource": "" }
c513
SetRecoveryWindowInDays
train
s.RecoveryWindowInDays = &v return s }
go
{ "resource": "" }
c514
SetVersionIdsToStages
train
*DescribeSecretOutput { s.VersionIdsToStages = v return s }
go
{ "resource": "" }
c515
SetExcludeCharacters
train
{ s.ExcludeCharacters = &v return s }
go
{ "resource": "" }
c516
SetExcludeLowercase
train
bool) *GetRandomPasswordInput { s.ExcludeLowercase = &v return s }
go
{ "resource": "" }
c517
SetExcludeNumbers
train
{ s.ExcludeNumbers = &v return s }
go
{ "resource": "" }
c518
SetExcludePunctuation
train
bool) *GetRandomPasswordInput { s.ExcludePunctuation = &v return s }
go
{ "resource": "" }
c519
SetExcludeUppercase
train
bool) *GetRandomPasswordInput { s.ExcludeUppercase = &v return s }
go
{ "resource": "" }
c520
SetIncludeSpace
train
{ s.IncludeSpace = &v return s }
go
{ "resource": "" }
c521
SetPasswordLength
train
{ s.PasswordLength = &v return s }
go
{ "resource": "" }
c522
SetRequireEachIncludedType
train
s.RequireEachIncludedType = &v return s }
go
{ "resource": "" }
c523
SetRandomPassword
train
{ s.RandomPassword = &v return s }
go
{ "resource": "" }
c524
SetIncludeDeprecated
train
{ s.IncludeDeprecated = &v return s }
go
{ "resource": "" }
c525
SetSecretList
train
*ListSecretsOutput { s.SecretList = v return s }
go
{ "resource": "" }
c526
SetAutomaticallyAfterDays
train
s.AutomaticallyAfterDays = &v return s }
go
{ "resource": "" }
c527
SetSecretVersionsToStages
train
*SecretListEntry { s.SecretVersionsToStages = v return s }
go
{ "resource": "" }
c528
SetMoveToVersionId
train
string) *UpdateSecretVersionStageInput { s.MoveToVersionId = &v return s }
go
{ "resource": "" }
c529
SetRemoveFromVersionId
train
string) *UpdateSecretVersionStageInput { s.RemoveFromVersionId = &v return s }
go
{ "resource": "" }
c530
SetAuthorizationToken
train
s.AuthorizationToken = &v return s }
go
{ "resource": "" }
c531
SetProxyEndpoint
train
s.ProxyEndpoint = &v return s }
go
{ "resource": "" }
c532
SetAcceptedMediaTypes
train
s.AcceptedMediaTypes = v return s }
go
{ "resource": "" }
c533
SetImageDetails
train
[]*ImageDetail) *DescribeImagesOutput { s.ImageDetails = v return s }
go
{ "resource": "" }
c534
SetRegistryIds
train
[]*string) *GetAuthorizationTokenInput { s.RegistryIds = v return s }
go
{ "resource": "" }
c535
SetAuthorizationData
train
[]*AuthorizationData) *GetAuthorizationTokenOutput { s.AuthorizationData = v return s }
go
{ "resource": "" }
c536
SetPreviewResults
train
*GetLifecyclePolicyPreviewOutput { s.PreviewResults = v return s }
go
{ "resource": "" }
c537
SetImageSizeInBytes
train
s.ImageSizeInBytes = &v return s }
go
{ "resource": "" }
c538
SetLayerAvailability
train
s.LayerAvailability = &v return s }
go
{ "resource": "" }
c539
SetLayerSize
train
s.LayerSize = &v return s }
go
{ "resource": "" }
c540
SetAppliedRulePriority
train
int64) *LifecyclePolicyPreviewResult { s.AppliedRulePriority = &v return s }
go
{ "resource": "" }
c541
SetExpiringImageTotalCount
train
{ s.ExpiringImageTotalCount = &v return s }
go
{ "resource": "" }
c542
SetRepositoryArn
train
s.RepositoryArn = &v return s }
go
{ "resource": "" }
c543
SetRepositoryUri
train
s.RepositoryUri = &v return s }
go
{ "resource": "" }
c544
SetLayerPartBlob
train
{ s.LayerPartBlob = v return s }
go
{ "resource": "" }
c545
SetPartFirstByte
train
{ s.PartFirstByte = &v return s }
go
{ "resource": "" }
c546
SetPartLastByte
train
{ s.PartLastByte = &v return s }
go
{ "resource": "" }
c547
SetLastByteReceived
train
int64) *UploadLayerPartOutput { s.LastByteReceived = &v return s }
go
{ "resource": "" }
c548
UnmarshalXML
train
err = parse(reflect.ValueOf(v), c, "") if err != nil { if err == io.EOF { return nil } return err } } } return nil } return nil }
go
{ "resource": "" }
c549
parse
train
t = "structure" } case reflect.Slice: // also it can't be a byte slice if _, ok := r.Interface().([]byte); !ok { t = "list" } case reflect.Map: t = "map" } } switch t { case "structure": if field, ok := rtype.FieldByName("_"); ok { tag = field.Tag } return parseStruct(r, node, t...
go
{ "resource": "" }
c550
parseStruct
train
// try to find the field by name in elements elems := node.Children[name] if elems == nil { // try to find the field in attributes if val, ok := node.findElem(name); ok { elems = []*XMLNode{{Text: val}} } } member := r.FieldByName(field.Name) for _, elem := range elems { err := parse(member,...
go
{ "resource": "" }
c551
parseList
train
r.Set(reflect.MakeSlice(t, len(Children), len(Children))) } for i, c := range Children { err := parse(r.Index(i), c, "") if err != nil { return err } } } } else { // flattened list means this is a single element if r.IsNil() { r.Set(reflect.MakeSlice(t, 0, 0)) } childR := reflec...
go
{ "resource": "" }
c552
parseMap
train
parseMapEntry(r, entry, tag) } } else { // this element is itself an entry parseMapEntry(r, node, tag) } return nil }
go
{ "resource": "" }
c553
parseMapEntry
train
keyR := reflect.ValueOf(key.Text) value := values[i] valueR := reflect.New(r.Type().Elem()).Elem() parse(valueR, value, "") r.SetMapIndex(keyR, valueR) } } return nil }
go
{ "resource": "" }
c554
parseScalar
train
v, err := strconv.ParseInt(node.Text, 10, 64) if err != nil { return err } r.Set(reflect.ValueOf(&v)) case *float64: v, err := strconv.ParseFloat(node.Text, 64) if err != nil { return err } r.Set(reflect.ValueOf(&v)) case *time.Time: format := tag.Get("timestampFormat") if len(format) == 0 {...
go
{ "resource": "" }
c555
Copy
train
UnmarshalError: h.UnmarshalError.copy(), UnmarshalMeta: h.UnmarshalMeta.copy(), Retry: h.Retry.copy(), AfterRetry: h.AfterRetry.copy(), CompleteAttempt: h.CompleteAttempt.copy(), Complete: h.Complete.copy(), } }
go
{ "resource": "" }
c556
Clear
train
h.ValidateResponse.Clear() h.Retry.Clear() h.AfterRetry.Clear() h.CompleteAttempt.Clear() h.Complete.Clear() }
go
{ "resource": "" }
c557
copy
train
append(make([]NamedHandler, 0, len(l.list)), l.list...) return n }
go
{ "resource": "" }
c558
PushBackNamed
train
== 0 { l.list = make([]NamedHandler, 0, 5) } l.list = append(l.list, n) }
go
{ "resource": "" }
c559
PushFrontNamed
train
= append([]NamedHandler{n}, l.list...) } else { // Enough room to prepend into list. l.list = append(l.list, NamedHandler{}) copy(l.list[1:], l.list) l.list[0] = n } }
go
{ "resource": "" }
c560
RemoveByName
train
creating new arrays copy(l.list[i:], l.list[i+1:]) l.list[len(l.list)-1] = NamedHandler{} l.list = l.list[:len(l.list)-1] // decrement list so next check to length is correct i-- } } }
go
{ "resource": "" }
c561
SwapNamed
train
n.Name { l.list[i].Fn = n.Fn swapped = true } } return swapped }
go
{ "resource": "" }
c562
Swap
train
i := 0; i < len(l.list); i++ { if l.list[i].Name == name { l.list[i] = replace swapped = true } } return swapped }
go
{ "resource": "" }
c563
SetBackNamed
train
{ if !l.SwapNamed(n) { l.PushBackNamed(n) } }
go
{ "resource": "" }
c564
SetFrontNamed
train
{ if !l.SwapNamed(n) { l.PushFrontNamed(n) } }
go
{ "resource": "" }
c565
Run
train
Index: i, Handler: h, Request: r, } if l.AfterEachFn != nil && !l.AfterEachFn(item) { return } } }
go
{ "resource": "" }
c566
HandlerListLogItem
train
return true } item.Request.Config.Logger.Log("DEBUG: RequestHandler", item.Index, item.Handler.Name, item.Request.Error) return true }
go
{ "resource": "" }
c567
WithAppendUserAgent
train
*Request) { AddToUserAgent(r, s) }) } }
go
{ "resource": "" }
c568
BuildXML
train
buildXML(params, e, false) }
go
{ "resource": "" }
c569
elemOf
train
value = value.Elem() } return value }
go
{ "resource": "" }
c570
buildValue
train
} switch t { case "structure": if field, ok := value.Type().FieldByName("_"); ok { tag = tag + reflect.StructTag(" ") + field.Tag } return b.buildStruct(value, current, tag) case "list": return b.buildList(value, current, tag) case "map": return b.buildMap(value, current, tag) default: return b.b...
go
{ "resource": "" }
c571
buildStruct
train
continue } mTag := field.Tag if mTag.Get("location") != "" { // skip non-body members nonPayloadFields++ continue } payloadFields++ if protocol.CanSetIdempotencyToken(value.Field(i), field) { token := protocol.GetIdempotencyToken() member = reflect.ValueOf(token) } memberName := mTag.Ge...
go
{ "resource": "" }
c572
buildList
train
:= NewXMLElement(xname) current.AddChild(child) if err := b.buildValue(value.Index(i), child, ""); err != nil { return err } } } else { list := NewXMLElement(xname) current.AddChild(list) for i := 0; i < value.Len(); i++ { iname := tag.Get("locationNameList") if iname == "" { iname = "...
go
{ "resource": "" }
c573
buildScalar
train
} str = protocol.FormatTime(format, converted) default: return fmt.Errorf("unsupported value for param %s: %v (%s)", tag.Get("locationName"), value.Interface(), value.Type().Name()) } xname := xml.Name{Local: tag.Get("locationName")} if tag.Get("xmlAttribute") != "" { // put into current node's attribute...
go
{ "resource": "" }
c574
WaitUntilIdentityExists
train
c.WaitUntilIdentityExistsWithContext(aws.BackgroundContext(), input) }
go
{ "resource": "" }
c575
WaitUntilDistributionDeployed
train
c.WaitUntilDistributionDeployedWithContext(aws.BackgroundContext(), input) }
go
{ "resource": "" }
c576
WaitUntilInvalidationCompleted
train
c.WaitUntilInvalidationCompletedWithContext(aws.BackgroundContext(), input) }
go
{ "resource": "" }
c577
WaitUntilStreamingDistributionDeployed
train
c.WaitUntilStreamingDistributionDeployedWithContext(aws.BackgroundContext(), input) }
go
{ "resource": "" }
c578
WaitUntilAppExists
train
c.WaitUntilAppExistsWithContext(aws.BackgroundContext(), input) }
go
{ "resource": "" }
c579
WaitUntilDeploymentSuccessful
train
c.WaitUntilDeploymentSuccessfulWithContext(aws.BackgroundContext(), input) }
go
{ "resource": "" }
c580
WaitUntilInstanceOnline
train
c.WaitUntilInstanceOnlineWithContext(aws.BackgroundContext(), input) }
go
{ "resource": "" }
c581
WaitUntilInstanceRegistered
train
c.WaitUntilInstanceRegisteredWithContext(aws.BackgroundContext(), input) }
go
{ "resource": "" }
c582
WaitUntilInstanceTerminated
train
c.WaitUntilInstanceTerminatedWithContext(aws.BackgroundContext(), input) }
go
{ "resource": "" }
c583
SetSharedDirectory
train
*SharedDirectory) *AcceptSharedDirectoryOutput { s.SharedDirectory = v return s }
go
{ "resource": "" }
c584
SetIpRoutes
train
{ s.IpRoutes = v return s }
go
{ "resource": "" }
c585
SetUpdateSecurityGroupForDirectoryControllers
train
s.UpdateSecurityGroupForDirectoryControllers = &v return s }
go
{ "resource": "" }
c586
SetComputerId
train
s.ComputerId = &v return s }
go
{ "resource": "" }
c587
SetReplicationScope
train
string) *ConditionalForwarder { s.ReplicationScope = &v return s }
go
{ "resource": "" }
c588
SetComputer
train
*Computer) *CreateComputerOutput { s.Computer = v return s }
go
{ "resource": "" }
c589
SetConditionalForwarderIpAddrs
train
s.ConditionalForwarderIpAddrs = v return s }
go
{ "resource": "" }
c590
SetTrustPassword
train
s.TrustPassword = &v return s }
go
{ "resource": "" }
c591
SetDeleteAssociatedConditionalForwarder
train
s.DeleteAssociatedConditionalForwarder = &v return s }
go
{ "resource": "" }
c592
SetRemoteDomainNames
train
[]*string) *DescribeConditionalForwardersInput { s.RemoteDomainNames = v return s }
go
{ "resource": "" }
c593
SetConditionalForwarders
train
[]*ConditionalForwarder) *DescribeConditionalForwardersOutput { s.ConditionalForwarders = v return s }
go
{ "resource": "" }
c594
SetDirectoryDescriptions
train
[]*DirectoryDescription) *DescribeDirectoriesOutput { s.DirectoryDescriptions = v return s }
go
{ "resource": "" }
c595
SetDomainControllerIds
train
[]*string) *DescribeDomainControllersInput { s.DomainControllerIds = v return s }
go
{ "resource": "" }
c596
SetTopicNames
train
[]*string) *DescribeEventTopicsInput { s.TopicNames = v return s }
go
{ "resource": "" }
c597
SetEventTopics
train
[]*EventTopic) *DescribeEventTopicsOutput { s.EventTopics = v return s }
go
{ "resource": "" }
c598
SetSharedDirectoryIds
train
[]*string) *DescribeSharedDirectoriesInput { s.SharedDirectoryIds = v return s }
go
{ "resource": "" }
c599
SetSharedDirectories
train
[]*SharedDirectory) *DescribeSharedDirectoriesOutput { s.SharedDirectories = v return s }
go
{ "resource": "" }