_id stringlengths 2 7 | title stringlengths 1 118 | partition stringclasses 3
values | text stringlengths 52 85.5k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q3100 | SetPartial | train | func (s *SearchInput) SetPartial(v bool) *SearchInput {
s.Partial = &v
return s
} | go | {
"resource": ""
} |
q3101 | SetQueryOptions | train | func (s *SearchInput) SetQueryOptions(v string) *SearchInput {
s.QueryOptions = &v
return s
} | go | {
"resource": ""
} |
q3102 | SetQueryParser | train | func (s *SearchInput) SetQueryParser(v string) *SearchInput {
s.QueryParser = &v
return s
} | go | {
"resource": ""
} |
q3103 | SetReturn | train | func (s *SearchInput) SetReturn(v string) *SearchInput {
s.Return = &v
return s
} | go | {
"resource": ""
} |
q3104 | SetFacets | train | func (s *SearchOutput) SetFacets(v map[string]*BucketInfo) *SearchOutput {
s.Facets = v
return s
} | go | {
"resource": ""
} |
q3105 | SetHits | train | func (s *SearchOutput) SetHits(v *Hits) *SearchOutput {
s.Hits = v
return s
} | go | {
"resource": ""
} |
q3106 | SetSuggestions | train | func (s *SuggestModel) SetSuggestions(v []*SuggestionMatch) *SuggestModel {
s.Suggestions = v
return s
} | go | {
"resource": ""
} |
q3107 | SetSuggest | train | func (s *SuggestOutput) SetSuggest(v *SuggestModel) *SuggestOutput {
s.Suggest = v
return s
} | go | {
"resource": ""
} |
q3108 | SetSuggestion | train | func (s *SuggestionMatch) SetSuggestion(v string) *SuggestionMatch {
s.Suggestion = &v
return s
} | go | {
"resource": ""
} |
q3109 | SetAdds | train | func (s *UploadDocumentsOutput) SetAdds(v int64) *UploadDocumentsOutput {
s.Adds = &v
return s
} | go | {
"resource": ""
} |
q3110 | WaitUntilClusterRunning | train | func (c *EMR) WaitUntilClusterRunning(input *DescribeClusterInput) error {
return c.WaitUntilClusterRunningWithContext(aws.BackgroundContext(), input)
} | go | {
"resource": ""
} |
q3111 | WaitUntilClusterTerminated | train | func (c *EMR) WaitUntilClusterTerminated(input *DescribeClusterInput) error {
return c.WaitUntilClusterTerminatedWithContext(aws.BackgroundContext(), input)
} | go | {
"resource": ""
} |
q3112 | WaitUntilStepComplete | train | func (c *EMR) WaitUntilStepComplete(input *DescribeStepInput) error {
return c.WaitUntilStepCompleteWithContext(aws.BackgroundContext(), input)
} | go | {
"resource": ""
} |
q3113 | typeName | train | func (f paramFiller) typeName(shape *Shape) string {
if f.prefixPackageName && shape.Type == "structure" {
return "*" + shape.API.PackageName() + "." + shape.GoTypeElem()
}
return shape.GoType()
} | go | {
"resource": ""
} |
q3114 | ParamsStructFromJSON | train | func ParamsStructFromJSON(value interface{}, shape *Shape, prefixPackageName bool) string {
f := paramFiller{prefixPackageName: prefixPackageName}
return util.GoFmt(f.paramsStructAny(value, shape))
} | go | {
"resource": ""
} |
q3115 | paramsStructAny | train | func (f paramFiller) paramsStructAny(value interface{}, shape *Shape) string {
if value == nil {
return ""
}
switch shape.Type {
case "structure":
if value != nil {
vmap := value.(map[string]interface{})
return f.paramsStructStruct(vmap, shape)
}
case "list":
vlist := value.([]interface{})
return ... | go | {
"resource": ""
} |
q3116 | paramsStructStruct | train | func (f paramFiller) paramsStructStruct(value map[string]interface{}, shape *Shape) string {
out := "&" + f.typeName(shape)[1:] + "{\n"
for _, n := range shape.MemberNames() {
ref := shape.MemberRefs[n]
name := findParamMember(value, n)
if val := f.paramsStructAny(value[name], ref.Shape); val != "" {
out +=... | go | {
"resource": ""
} |
q3117 | paramsStructMap | train | func (f paramFiller) paramsStructMap(value map[string]interface{}, shape *Shape) string {
out := f.typeName(shape) + "{\n"
keys := util.SortedKeys(value)
for _, k := range keys {
v := value[k]
out += fmt.Sprintf("%q: %s,\n", k, f.paramsStructAny(v, shape.ValueRef.Shape))
}
out += "}"
return out
} | go | {
"resource": ""
} |
q3118 | paramsStructList | train | func (f paramFiller) paramsStructList(value []interface{}, shape *Shape) string {
out := f.typeName(shape) + "{\n"
for _, v := range value {
out += fmt.Sprintf("%s,\n", f.paramsStructAny(v, shape.MemberRef.Shape))
}
out += "}"
return out
} | go | {
"resource": ""
} |
q3119 | findParamMember | train | func findParamMember(value map[string]interface{}, key string) string {
for actualKey := range value {
if strings.ToLower(key) == strings.ToLower(actualKey) {
return actualKey
}
}
return ""
} | go | {
"resource": ""
} |
q3120 | SetApiKeyVersion | train | func (s *Account) SetApiKeyVersion(v string) *Account {
s.ApiKeyVersion = &v
return s
} | go | {
"resource": ""
} |
q3121 | SetCloudwatchRoleArn | train | func (s *Account) SetCloudwatchRoleArn(v string) *Account {
s.CloudwatchRoleArn = &v
return s
} | go | {
"resource": ""
} |
q3122 | SetThrottleSettings | train | func (s *Account) SetThrottleSettings(v *ThrottleSettings) *Account {
s.ThrottleSettings = v
return s
} | go | {
"resource": ""
} |
q3123 | SetGenerateDistinctId | train | func (s *CreateApiKeyInput) SetGenerateDistinctId(v bool) *CreateApiKeyInput {
s.GenerateDistinctId = &v
return s
} | go | {
"resource": ""
} |
q3124 | SetStageDescription | train | func (s *CreateDeploymentInput) SetStageDescription(v string) *CreateDeploymentInput {
s.StageDescription = &v
return s
} | go | {
"resource": ""
} |
q3125 | SetCertificatePrivateKey | train | func (s *CreateDomainNameInput) SetCertificatePrivateKey(v string) *CreateDomainNameInput {
s.CertificatePrivateKey = &v
return s
} | go | {
"resource": ""
} |
q3126 | SetCloneFrom | train | func (s *CreateRestApiInput) SetCloneFrom(v string) *CreateRestApiInput {
s.CloneFrom = &v
return s
} | go | {
"resource": ""
} |
q3127 | SetApiSummary | train | func (s *Deployment) SetApiSummary(v map[string]map[string]*MethodSnapshot) *Deployment {
s.ApiSummary = v
return s
} | go | {
"resource": ""
} |
q3128 | SetDistributionDomainName | train | func (s *DomainName) SetDistributionDomainName(v string) *DomainName {
s.DistributionDomainName = &v
return s
} | go | {
"resource": ""
} |
q3129 | SetDistributionHostedZoneId | train | func (s *DomainName) SetDistributionHostedZoneId(v string) *DomainName {
s.DistributionHostedZoneId = &v
return s
} | go | {
"resource": ""
} |
q3130 | SetRegionalDomainName | train | func (s *DomainName) SetRegionalDomainName(v string) *DomainName {
s.RegionalDomainName = &v
return s
} | go | {
"resource": ""
} |
q3131 | SetRegionalHostedZoneId | train | func (s *DomainName) SetRegionalHostedZoneId(v string) *DomainName {
s.RegionalHostedZoneId = &v
return s
} | go | {
"resource": ""
} |
q3132 | SetIncludeValue | train | func (s *GetApiKeyInput) SetIncludeValue(v bool) *GetApiKeyInput {
s.IncludeValue = &v
return s
} | go | {
"resource": ""
} |
q3133 | SetIncludeValues | train | func (s *GetApiKeysInput) SetIncludeValues(v bool) *GetApiKeysInput {
s.IncludeValues = &v
return s
} | go | {
"resource": ""
} |
q3134 | SetLocationStatus | train | func (s *GetDocumentationPartsInput) SetLocationStatus(v string) *GetDocumentationPartsInput {
s.LocationStatus = &v
return s
} | go | {
"resource": ""
} |
q3135 | SetAccepts | train | func (s *GetExportInput) SetAccepts(v string) *GetExportInput {
s.Accepts = &v
return s
} | go | {
"resource": ""
} |
q3136 | SetFlatten | train | func (s *GetModelInput) SetFlatten(v bool) *GetModelInput {
s.Flatten = &v
return s
} | go | {
"resource": ""
} |
q3137 | SetSdkType | train | func (s *GetSdkInput) SetSdkType(v string) *GetSdkInput {
s.SdkType = &v
return s
} | go | {
"resource": ""
} |
q3138 | SetIntegrationResponses | train | func (s *Integration) SetIntegrationResponses(v map[string]*IntegrationResponse) *Integration {
s.IntegrationResponses = v
return s
} | go | {
"resource": ""
} |
q3139 | SetMethodIntegration | train | func (s *Method) SetMethodIntegration(v *Integration) *Method {
s.MethodIntegration = v
return s
} | go | {
"resource": ""
} |
q3140 | SetMethodResponses | train | func (s *Method) SetMethodResponses(v map[string]*MethodResponse) *Method {
s.MethodResponses = v
return s
} | go | {
"resource": ""
} |
q3141 | SetCacheDataEncrypted | train | func (s *MethodSetting) SetCacheDataEncrypted(v bool) *MethodSetting {
s.CacheDataEncrypted = &v
return s
} | go | {
"resource": ""
} |
q3142 | SetCacheTtlInSeconds | train | func (s *MethodSetting) SetCacheTtlInSeconds(v int64) *MethodSetting {
s.CacheTtlInSeconds = &v
return s
} | go | {
"resource": ""
} |
q3143 | SetCachingEnabled | train | func (s *MethodSetting) SetCachingEnabled(v bool) *MethodSetting {
s.CachingEnabled = &v
return s
} | go | {
"resource": ""
} |
q3144 | SetMetricsEnabled | train | func (s *MethodSetting) SetMetricsEnabled(v bool) *MethodSetting {
s.MetricsEnabled = &v
return s
} | go | {
"resource": ""
} |
q3145 | SetRequireAuthorizationForCacheControl | train | func (s *MethodSetting) SetRequireAuthorizationForCacheControl(v bool) *MethodSetting {
s.RequireAuthorizationForCacheControl = &v
return s
} | go | {
"resource": ""
} |
q3146 | SetUnauthorizedCacheControlHeaderStrategy | train | func (s *MethodSetting) SetUnauthorizedCacheControlHeaderStrategy(v string) *MethodSetting {
s.UnauthorizedCacheControlHeaderStrategy = &v
return s
} | go | {
"resource": ""
} |
q3147 | SetIntegrationHttpMethod | train | func (s *PutIntegrationInput) SetIntegrationHttpMethod(v string) *PutIntegrationInput {
s.IntegrationHttpMethod = &v
return s
} | go | {
"resource": ""
} |
q3148 | SetResourceMethods | train | func (s *Resource) SetResourceMethods(v map[string]*Method) *Resource {
s.ResourceMethods = v
return s
} | go | {
"resource": ""
} |
q3149 | SetMethodSettings | train | func (s *Stage) SetMethodSettings(v map[string]*MethodSetting) *Stage {
s.MethodSettings = v
return s
} | go | {
"resource": ""
} |
q3150 | SetWebAclArn | train | func (s *Stage) SetWebAclArn(v string) *Stage {
s.WebAclArn = &v
return s
} | go | {
"resource": ""
} |
q3151 | SetAdditionalContext | train | func (s *TestInvokeAuthorizerInput) SetAdditionalContext(v map[string]*string) *TestInvokeAuthorizerInput {
s.AdditionalContext = v
return s
} | go | {
"resource": ""
} |
q3152 | SetAuthorization | train | func (s *TestInvokeAuthorizerOutput) SetAuthorization(v map[string][]*string) *TestInvokeAuthorizerOutput {
s.Authorization = v
return s
} | go | {
"resource": ""
} |
q3153 | SetClaims | train | func (s *TestInvokeAuthorizerOutput) SetClaims(v map[string]*string) *TestInvokeAuthorizerOutput {
s.Claims = v
return s
} | go | {
"resource": ""
} |
q3154 | SetClientStatus | train | func (s *TestInvokeAuthorizerOutput) SetClientStatus(v int64) *TestInvokeAuthorizerOutput {
s.ClientStatus = &v
return s
} | go | {
"resource": ""
} |
q3155 | SetBurstLimit | train | func (s *ThrottleSettings) SetBurstLimit(v int64) *ThrottleSettings {
s.BurstLimit = &v
return s
} | go | {
"resource": ""
} |
q3156 | SetDefaultResponse | train | func (s *UpdateGatewayResponseOutput) SetDefaultResponse(v bool) *UpdateGatewayResponseOutput {
s.DefaultResponse = &v
return s
} | go | {
"resource": ""
} |
q3157 | WaitUntilResourceRecordSetsChanged | train | func (c *Route53) WaitUntilResourceRecordSetsChanged(input *GetChangeInput) error {
return c.WaitUntilResourceRecordSetsChangedWithContext(aws.BackgroundContext(), input)
} | go | {
"resource": ""
} |
q3158 | Save | train | func (strat S3SaveStrategy) Save(env Envelope, req *request.Request) error {
input := req.Params.(*s3.PutObjectInput)
b, err := json.Marshal(env)
if err != nil {
return err
}
instInput := s3.PutObjectInput{
Bucket: input.Bucket,
Body: bytes.NewReader(b),
}
if strat.InstructionFileSuffix == "" {
instI... | go | {
"resource": ""
} |
q3159 | Save | train | func (strat HeaderV2SaveStrategy) Save(env Envelope, req *request.Request) error {
input := req.Params.(*s3.PutObjectInput)
if input.Metadata == nil {
input.Metadata = map[string]*string{}
}
input.Metadata[http.CanonicalHeaderKey(keyV2Header)] = &env.CipherKey
input.Metadata[http.CanonicalHeaderKey(ivHeader)] =... | go | {
"resource": ""
} |
q3160 | Load | train | func (load S3LoadStrategy) Load(req *request.Request) (Envelope, error) {
env := Envelope{}
if load.InstructionFileSuffix == "" {
load.InstructionFileSuffix = DefaultInstructionKeySuffix
}
input := req.Params.(*s3.GetObjectInput)
out, err := load.Client.GetObject(&s3.GetObjectInput{
Key: aws.String(strings... | go | {
"resource": ""
} |
q3161 | Load | train | func (load HeaderV2LoadStrategy) Load(req *request.Request) (Envelope, error) {
env := Envelope{}
env.CipherKey = req.HTTPResponse.Header.Get(strings.Join([]string{metaHeader, keyV2Header}, "-"))
env.IV = req.HTTPResponse.Header.Get(strings.Join([]string{metaHeader, ivHeader}, "-"))
env.MatDesc = req.HTTPResponse.H... | go | {
"resource": ""
} |
q3162 | GetBucketRegionWithClient | train | func GetBucketRegionWithClient(ctx aws.Context, svc s3iface.S3API, bucket string, opts ...request.Option) (string, error) {
req, _ := svc.HeadBucketRequest(&s3.HeadBucketInput{
Bucket: aws.String(bucket),
})
req.Config.S3ForcePathStyle = aws.Bool(true)
req.Config.Credentials = credentials.AnonymousCredentials
re... | go | {
"resource": ""
} |
q3163 | SetAvailablePlatforms | train | func (s *BundleDetails) SetAvailablePlatforms(v []*string) *BundleDetails {
s.AvailablePlatforms = v
return s
} | go | {
"resource": ""
} |
q3164 | SetDeletedResources | train | func (s *DeleteProjectOutput) SetDeletedResources(v []*Resource) *DeleteProjectOutput {
s.DeletedResources = v
return s
} | go | {
"resource": ""
} |
q3165 | SetOrphanedResources | train | func (s *DeleteProjectOutput) SetOrphanedResources(v []*Resource) *DeleteProjectOutput {
s.OrphanedResources = v
return s
} | go | {
"resource": ""
} |
q3166 | SetSyncFromResources | train | func (s *DescribeProjectInput) SetSyncFromResources(v bool) *DescribeProjectInput {
s.SyncFromResources = &v
return s
} | go | {
"resource": ""
} |
q3167 | SetShareUrl | train | func (s *ExportProjectOutput) SetShareUrl(v string) *ExportProjectOutput {
s.ShareUrl = &v
return s
} | go | {
"resource": ""
} |
q3168 | SetBundleList | train | func (s *ListBundlesOutput) SetBundleList(v []*BundleDetails) *ListBundlesOutput {
s.BundleList = v
return s
} | go | {
"resource": ""
} |
q3169 | SetConsoleUrl | train | func (s *ProjectDetails) SetConsoleUrl(v string) *ProjectDetails {
s.ConsoleUrl = &v
return s
} | go | {
"resource": ""
} |
q3170 | SetFeature | train | func (s *Resource) SetFeature(v string) *Resource {
s.Feature = &v
return s
} | go | {
"resource": ""
} |
q3171 | SetBackupState | train | func (s *Backup) SetBackupState(v string) *Backup {
s.BackupState = &v
return s
} | go | {
"resource": ""
} |
q3172 | SetCopyTimestamp | train | func (s *Backup) SetCopyTimestamp(v time.Time) *Backup {
s.CopyTimestamp = &v
return s
} | go | {
"resource": ""
} |
q3173 | SetDeleteTimestamp | train | func (s *Backup) SetDeleteTimestamp(v time.Time) *Backup {
s.DeleteTimestamp = &v
return s
} | go | {
"resource": ""
} |
q3174 | SetAwsHardwareCertificate | train | func (s *Certificates) SetAwsHardwareCertificate(v string) *Certificates {
s.AwsHardwareCertificate = &v
return s
} | go | {
"resource": ""
} |
q3175 | SetClusterCertificate | train | func (s *Certificates) SetClusterCertificate(v string) *Certificates {
s.ClusterCertificate = &v
return s
} | go | {
"resource": ""
} |
q3176 | SetClusterCsr | train | func (s *Certificates) SetClusterCsr(v string) *Certificates {
s.ClusterCsr = &v
return s
} | go | {
"resource": ""
} |
q3177 | SetHsmCertificate | train | func (s *Certificates) SetHsmCertificate(v string) *Certificates {
s.HsmCertificate = &v
return s
} | go | {
"resource": ""
} |
q3178 | SetManufacturerHardwareCertificate | train | func (s *Certificates) SetManufacturerHardwareCertificate(v string) *Certificates {
s.ManufacturerHardwareCertificate = &v
return s
} | go | {
"resource": ""
} |
q3179 | SetBackupPolicy | train | func (s *Cluster) SetBackupPolicy(v string) *Cluster {
s.BackupPolicy = &v
return s
} | go | {
"resource": ""
} |
q3180 | SetHsms | train | func (s *Cluster) SetHsms(v []*Hsm) *Cluster {
s.Hsms = v
return s
} | go | {
"resource": ""
} |
q3181 | SetPreCoPassword | train | func (s *Cluster) SetPreCoPassword(v string) *Cluster {
s.PreCoPassword = &v
return s
} | go | {
"resource": ""
} |
q3182 | SetSubnetMapping | train | func (s *Cluster) SetSubnetMapping(v map[string]*string) *Cluster {
s.SubnetMapping = v
return s
} | go | {
"resource": ""
} |
q3183 | SetDestinationBackup | train | func (s *CopyBackupToRegionOutput) SetDestinationBackup(v *DestinationBackup) *CopyBackupToRegionOutput {
s.DestinationBackup = v
return s
} | go | {
"resource": ""
} |
q3184 | SetHsm | train | func (s *CreateHsmOutput) SetHsm(v *Hsm) *CreateHsmOutput {
s.Hsm = v
return s
} | go | {
"resource": ""
} |
q3185 | SetSortAscending | train | func (s *DescribeBackupsInput) SetSortAscending(v bool) *DescribeBackupsInput {
s.SortAscending = &v
return s
} | go | {
"resource": ""
} |
q3186 | SetSignedCert | train | func (s *InitializeClusterInput) SetSignedCert(v string) *InitializeClusterInput {
s.SignedCert = &v
return s
} | go | {
"resource": ""
} |
q3187 | SetTrustAnchor | train | func (s *InitializeClusterInput) SetTrustAnchor(v string) *InitializeClusterInput {
s.TrustAnchor = &v
return s
} | go | {
"resource": ""
} |
q3188 | Names | train | func (exs Examples) Names() []string {
names := make([]string, 0, len(exs))
for k := range exs {
names = append(names, k)
}
sort.Strings(names)
return names
} | go | {
"resource": ""
} |
q3189 | correctType | train | func correctType(memName string, t string, value interface{}) string {
if value == nil {
return ""
}
v := ""
switch value.(type) {
case string:
v = value.(string)
case int:
v = fmt.Sprintf("%d", value.(int))
case float64:
if t == "integer" || t == "long" || t == "int64" {
v = fmt.Sprintf("%d", int(va... | go | {
"resource": ""
} |
q3190 | ExamplesGoCode | train | func (a *API) ExamplesGoCode() string {
var buf bytes.Buffer
var builder examplesBuilder
ok := false
if builder, ok = examplesBuilderCustomizations[a.PackageName()]; !ok {
builder = defaultExamplesBuilder{}
}
if err := exampleHeader.ExecuteTemplate(&buf, "exampleHeader", &exHeader{builder, a}); err != nil {
... | go | {
"resource": ""
} |
q3191 | SetManifestLayout | train | func (s *DashPackage) SetManifestLayout(v string) *DashPackage {
s.ManifestLayout = &v
return s
} | go | {
"resource": ""
} |
q3192 | SetMinBufferTimeSeconds | train | func (s *DashPackage) SetMinBufferTimeSeconds(v int64) *DashPackage {
s.MinBufferTimeSeconds = &v
return s
} | go | {
"resource": ""
} |
q3193 | SetMinUpdatePeriodSeconds | train | func (s *DashPackage) SetMinUpdatePeriodSeconds(v int64) *DashPackage {
s.MinUpdatePeriodSeconds = &v
return s
} | go | {
"resource": ""
} |
q3194 | SetPeriodTriggers | train | func (s *DashPackage) SetPeriodTriggers(v []*string) *DashPackage {
s.PeriodTriggers = v
return s
} | go | {
"resource": ""
} |
q3195 | SetSegmentTemplateFormat | train | func (s *DashPackage) SetSegmentTemplateFormat(v string) *DashPackage {
s.SegmentTemplateFormat = &v
return s
} | go | {
"resource": ""
} |
q3196 | SetSuggestedPresentationDelaySeconds | train | func (s *DashPackage) SetSuggestedPresentationDelaySeconds(v int64) *DashPackage {
s.SuggestedPresentationDelaySeconds = &v
return s
} | go | {
"resource": ""
} |
q3197 | SetRepeatExtXKey | train | func (s *HlsEncryption) SetRepeatExtXKey(v bool) *HlsEncryption {
s.RepeatExtXKey = &v
return s
} | go | {
"resource": ""
} |
q3198 | SetIngestEndpoints | train | func (s *HlsIngest) SetIngestEndpoints(v []*IngestEndpoint) *HlsIngest {
s.IngestEndpoints = v
return s
} | go | {
"resource": ""
} |
q3199 | SetUseAudioRenditionGroup | train | func (s *HlsPackage) SetUseAudioRenditionGroup(v bool) *HlsPackage {
s.UseAudioRenditionGroup = &v
return s
} | go | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.