id
int32 0
167k
| repo
stringlengths 5
54
| path
stringlengths 4
155
| func_name
stringlengths 1
118
| original_string
stringlengths 52
85.5k
| language
stringclasses 1
value | code
stringlengths 52
85.5k
| code_tokens
sequencelengths 21
1.41k
| docstring
stringlengths 6
2.61k
| docstring_tokens
sequencelengths 3
215
| sha
stringlengths 40
40
| url
stringlengths 85
252
|
---|---|---|---|---|---|---|---|---|---|---|---|
165,200 | hashicorp/packer | builder/googlecompute/step_create_instance.go | Cleanup | func (s *StepCreateInstance) Cleanup(state multistep.StateBag) {
nameRaw, ok := state.GetOk("instance_name")
if !ok {
return
}
name := nameRaw.(string)
if name == "" {
return
}
config := state.Get("config").(*Config)
driver := state.Get("driver").(Driver)
ui := state.Get("ui").(packer.Ui)
ui.Say("Deleting instance...")
errCh, err := driver.DeleteInstance(config.Zone, name)
if err == nil {
select {
case err = <-errCh:
case <-time.After(config.stateTimeout):
err = errors.New("time out while waiting for instance to delete")
}
}
if err != nil {
ui.Error(fmt.Sprintf(
"Error deleting instance. Please delete it manually.\n\n"+
"Name: %s\n"+
"Error: %s", name, err))
}
ui.Message("Instance has been deleted!")
state.Put("instance_name", "")
// Deleting the instance does not remove the boot disk. This cleanup removes
// the disk.
ui.Say("Deleting disk...")
errCh, err = driver.DeleteDisk(config.Zone, config.DiskName)
if err == nil {
select {
case err = <-errCh:
case <-time.After(config.stateTimeout):
err = errors.New("time out while waiting for disk to delete")
}
}
if err != nil {
ui.Error(fmt.Sprintf(
"Error deleting disk. Please delete it manually.\n\n"+
"Name: %s\n"+
"Error: %s", config.InstanceName, err))
}
ui.Message("Disk has been deleted!")
return
} | go | func (s *StepCreateInstance) Cleanup(state multistep.StateBag) {
nameRaw, ok := state.GetOk("instance_name")
if !ok {
return
}
name := nameRaw.(string)
if name == "" {
return
}
config := state.Get("config").(*Config)
driver := state.Get("driver").(Driver)
ui := state.Get("ui").(packer.Ui)
ui.Say("Deleting instance...")
errCh, err := driver.DeleteInstance(config.Zone, name)
if err == nil {
select {
case err = <-errCh:
case <-time.After(config.stateTimeout):
err = errors.New("time out while waiting for instance to delete")
}
}
if err != nil {
ui.Error(fmt.Sprintf(
"Error deleting instance. Please delete it manually.\n\n"+
"Name: %s\n"+
"Error: %s", name, err))
}
ui.Message("Instance has been deleted!")
state.Put("instance_name", "")
// Deleting the instance does not remove the boot disk. This cleanup removes
// the disk.
ui.Say("Deleting disk...")
errCh, err = driver.DeleteDisk(config.Zone, config.DiskName)
if err == nil {
select {
case err = <-errCh:
case <-time.After(config.stateTimeout):
err = errors.New("time out while waiting for disk to delete")
}
}
if err != nil {
ui.Error(fmt.Sprintf(
"Error deleting disk. Please delete it manually.\n\n"+
"Name: %s\n"+
"Error: %s", config.InstanceName, err))
}
ui.Message("Disk has been deleted!")
return
} | [
"func",
"(",
"s",
"*",
"StepCreateInstance",
")",
"Cleanup",
"(",
"state",
"multistep",
".",
"StateBag",
")",
"{",
"nameRaw",
",",
"ok",
":=",
"state",
".",
"GetOk",
"(",
"\"",
"\"",
")",
"\n",
"if",
"!",
"ok",
"{",
"return",
"\n",
"}",
"\n",
"name",
":=",
"nameRaw",
".",
"(",
"string",
")",
"\n",
"if",
"name",
"==",
"\"",
"\"",
"{",
"return",
"\n",
"}",
"\n\n",
"config",
":=",
"state",
".",
"Get",
"(",
"\"",
"\"",
")",
".",
"(",
"*",
"Config",
")",
"\n",
"driver",
":=",
"state",
".",
"Get",
"(",
"\"",
"\"",
")",
".",
"(",
"Driver",
")",
"\n",
"ui",
":=",
"state",
".",
"Get",
"(",
"\"",
"\"",
")",
".",
"(",
"packer",
".",
"Ui",
")",
"\n\n",
"ui",
".",
"Say",
"(",
"\"",
"\"",
")",
"\n",
"errCh",
",",
"err",
":=",
"driver",
".",
"DeleteInstance",
"(",
"config",
".",
"Zone",
",",
"name",
")",
"\n",
"if",
"err",
"==",
"nil",
"{",
"select",
"{",
"case",
"err",
"=",
"<-",
"errCh",
":",
"case",
"<-",
"time",
".",
"After",
"(",
"config",
".",
"stateTimeout",
")",
":",
"err",
"=",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"}",
"\n\n",
"if",
"err",
"!=",
"nil",
"{",
"ui",
".",
"Error",
"(",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\\n",
"\\n",
"\"",
"+",
"\"",
"\\n",
"\"",
"+",
"\"",
"\"",
",",
"name",
",",
"err",
")",
")",
"\n",
"}",
"\n\n",
"ui",
".",
"Message",
"(",
"\"",
"\"",
")",
"\n",
"state",
".",
"Put",
"(",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\n\n",
"// Deleting the instance does not remove the boot disk. This cleanup removes",
"// the disk.",
"ui",
".",
"Say",
"(",
"\"",
"\"",
")",
"\n",
"errCh",
",",
"err",
"=",
"driver",
".",
"DeleteDisk",
"(",
"config",
".",
"Zone",
",",
"config",
".",
"DiskName",
")",
"\n",
"if",
"err",
"==",
"nil",
"{",
"select",
"{",
"case",
"err",
"=",
"<-",
"errCh",
":",
"case",
"<-",
"time",
".",
"After",
"(",
"config",
".",
"stateTimeout",
")",
":",
"err",
"=",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"}",
"\n\n",
"if",
"err",
"!=",
"nil",
"{",
"ui",
".",
"Error",
"(",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\\n",
"\\n",
"\"",
"+",
"\"",
"\\n",
"\"",
"+",
"\"",
"\"",
",",
"config",
".",
"InstanceName",
",",
"err",
")",
")",
"\n",
"}",
"\n\n",
"ui",
".",
"Message",
"(",
"\"",
"\"",
")",
"\n\n",
"return",
"\n",
"}"
] | // Cleanup destroys the GCE instance created during the image creation process. | [
"Cleanup",
"destroys",
"the",
"GCE",
"instance",
"created",
"during",
"the",
"image",
"creation",
"process",
"."
] | d343852c15da050ee3ad039cc4cadfbf7f9b1759 | https://github.com/hashicorp/packer/blob/d343852c15da050ee3ad039cc4cadfbf7f9b1759/builder/googlecompute/step_create_instance.go#L160-L216 |
165,201 | hashicorp/packer | builder/azure/common/vault.go | Delete | func (client *VaultClient) Delete(resourceGroupName string, vaultName string) (result autorest.Response, err error) {
req, err := client.DeletePreparer(resourceGroupName, vaultName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.VaultsClient", "Delete", nil, "Failure preparing request")
return
}
resp, err := client.DeleteSender(req)
if err != nil {
result.Response = resp
err = autorest.NewErrorWithError(err, "keyvault.VaultsClient", "Delete", resp, "Failure sending request")
return
}
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.VaultsClient", "Delete", resp, "Failure responding to request")
}
return
} | go | func (client *VaultClient) Delete(resourceGroupName string, vaultName string) (result autorest.Response, err error) {
req, err := client.DeletePreparer(resourceGroupName, vaultName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.VaultsClient", "Delete", nil, "Failure preparing request")
return
}
resp, err := client.DeleteSender(req)
if err != nil {
result.Response = resp
err = autorest.NewErrorWithError(err, "keyvault.VaultsClient", "Delete", resp, "Failure sending request")
return
}
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.VaultsClient", "Delete", resp, "Failure responding to request")
}
return
} | [
"func",
"(",
"client",
"*",
"VaultClient",
")",
"Delete",
"(",
"resourceGroupName",
"string",
",",
"vaultName",
"string",
")",
"(",
"result",
"autorest",
".",
"Response",
",",
"err",
"error",
")",
"{",
"req",
",",
"err",
":=",
"client",
".",
"DeletePreparer",
"(",
"resourceGroupName",
",",
"vaultName",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"autorest",
".",
"NewErrorWithError",
"(",
"err",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"\"",
"\"",
")",
"\n",
"return",
"\n",
"}",
"\n\n",
"resp",
",",
"err",
":=",
"client",
".",
"DeleteSender",
"(",
"req",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"result",
".",
"Response",
"=",
"resp",
"\n",
"err",
"=",
"autorest",
".",
"NewErrorWithError",
"(",
"err",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"resp",
",",
"\"",
"\"",
")",
"\n",
"return",
"\n",
"}",
"\n\n",
"result",
",",
"err",
"=",
"client",
".",
"DeleteResponder",
"(",
"resp",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"autorest",
".",
"NewErrorWithError",
"(",
"err",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"resp",
",",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"return",
"\n",
"}"
] | // Delete deletes the specified Azure key vault.
//
// resourceGroupName is the name of the Resource Group to which the vault belongs. vaultName is the name of the vault
// to delete | [
"Delete",
"deletes",
"the",
"specified",
"Azure",
"key",
"vault",
".",
"resourceGroupName",
"is",
"the",
"name",
"of",
"the",
"Resource",
"Group",
"to",
"which",
"the",
"vault",
"belongs",
".",
"vaultName",
"is",
"the",
"name",
"of",
"the",
"vault",
"to",
"delete"
] | d343852c15da050ee3ad039cc4cadfbf7f9b1759 | https://github.com/hashicorp/packer/blob/d343852c15da050ee3ad039cc4cadfbf7f9b1759/builder/azure/common/vault.go#L93-L113 |
165,202 | hashicorp/packer | builder/azure/common/vault.go | DeletePreparer | func (client *VaultClient) DeletePreparer(resourceGroupName string, vaultName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"SubscriptionID": autorest.Encode("path", client.SubscriptionID),
"vaultName": autorest.Encode("path", vaultName),
}
queryParameters := map[string]interface{}{
"api-version": AzureVaultApiVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
autorest.WithBaseURL(client.baseURI),
autorest.WithPathParameters("/subscriptions/{SubscriptionID}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
} | go | func (client *VaultClient) DeletePreparer(resourceGroupName string, vaultName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"SubscriptionID": autorest.Encode("path", client.SubscriptionID),
"vaultName": autorest.Encode("path", vaultName),
}
queryParameters := map[string]interface{}{
"api-version": AzureVaultApiVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
autorest.WithBaseURL(client.baseURI),
autorest.WithPathParameters("/subscriptions/{SubscriptionID}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
} | [
"func",
"(",
"client",
"*",
"VaultClient",
")",
"DeletePreparer",
"(",
"resourceGroupName",
"string",
",",
"vaultName",
"string",
")",
"(",
"*",
"http",
".",
"Request",
",",
"error",
")",
"{",
"pathParameters",
":=",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
"{",
"\"",
"\"",
":",
"autorest",
".",
"Encode",
"(",
"\"",
"\"",
",",
"resourceGroupName",
")",
",",
"\"",
"\"",
":",
"autorest",
".",
"Encode",
"(",
"\"",
"\"",
",",
"client",
".",
"SubscriptionID",
")",
",",
"\"",
"\"",
":",
"autorest",
".",
"Encode",
"(",
"\"",
"\"",
",",
"vaultName",
")",
",",
"}",
"\n\n",
"queryParameters",
":=",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
"{",
"\"",
"\"",
":",
"AzureVaultApiVersion",
",",
"}",
"\n\n",
"preparer",
":=",
"autorest",
".",
"CreatePreparer",
"(",
"autorest",
".",
"AsDelete",
"(",
")",
",",
"autorest",
".",
"WithBaseURL",
"(",
"client",
".",
"baseURI",
")",
",",
"autorest",
".",
"WithPathParameters",
"(",
"\"",
"\"",
",",
"pathParameters",
")",
",",
"autorest",
".",
"WithQueryParameters",
"(",
"queryParameters",
")",
")",
"\n",
"return",
"preparer",
".",
"Prepare",
"(",
"&",
"http",
".",
"Request",
"{",
"}",
")",
"\n",
"}"
] | // DeletePreparer prepares the Delete request. | [
"DeletePreparer",
"prepares",
"the",
"Delete",
"request",
"."
] | d343852c15da050ee3ad039cc4cadfbf7f9b1759 | https://github.com/hashicorp/packer/blob/d343852c15da050ee3ad039cc4cadfbf7f9b1759/builder/azure/common/vault.go#L116-L133 |
165,203 | hashicorp/packer | builder/azure/common/vault.go | DeleteSender | func (client *VaultClient) DeleteSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client,
req,
azure.DoPollForAsynchronous(client.PollingDelay))
} | go | func (client *VaultClient) DeleteSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client,
req,
azure.DoPollForAsynchronous(client.PollingDelay))
} | [
"func",
"(",
"client",
"*",
"VaultClient",
")",
"DeleteSender",
"(",
"req",
"*",
"http",
".",
"Request",
")",
"(",
"*",
"http",
".",
"Response",
",",
"error",
")",
"{",
"return",
"autorest",
".",
"SendWithSender",
"(",
"client",
",",
"req",
",",
"azure",
".",
"DoPollForAsynchronous",
"(",
"client",
".",
"PollingDelay",
")",
")",
"\n",
"}"
] | // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. | [
"DeleteSender",
"sends",
"the",
"Delete",
"request",
".",
"The",
"method",
"will",
"close",
"the",
"http",
".",
"Response",
"Body",
"if",
"it",
"receives",
"an",
"error",
"."
] | d343852c15da050ee3ad039cc4cadfbf7f9b1759 | https://github.com/hashicorp/packer/blob/d343852c15da050ee3ad039cc4cadfbf7f9b1759/builder/azure/common/vault.go#L137-L141 |
165,204 | hashicorp/packer | builder/azure/common/vault.go | DeleteResponder | func (client *VaultClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
} | go | func (client *VaultClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByClosing())
result.Response = resp
return
} | [
"func",
"(",
"client",
"*",
"VaultClient",
")",
"DeleteResponder",
"(",
"resp",
"*",
"http",
".",
"Response",
")",
"(",
"result",
"autorest",
".",
"Response",
",",
"err",
"error",
")",
"{",
"err",
"=",
"autorest",
".",
"Respond",
"(",
"resp",
",",
"client",
".",
"ByInspecting",
"(",
")",
",",
"azure",
".",
"WithErrorUnlessStatusCode",
"(",
"http",
".",
"StatusOK",
")",
",",
"autorest",
".",
"ByClosing",
"(",
")",
")",
"\n",
"result",
".",
"Response",
"=",
"resp",
"\n",
"return",
"\n",
"}"
] | // DeleteResponder handles the response to the Delete request. The method always
// closes the http.Response Body. | [
"DeleteResponder",
"handles",
"the",
"response",
"to",
"the",
"Delete",
"request",
".",
"The",
"method",
"always",
"closes",
"the",
"http",
".",
"Response",
"Body",
"."
] | d343852c15da050ee3ad039cc4cadfbf7f9b1759 | https://github.com/hashicorp/packer/blob/d343852c15da050ee3ad039cc4cadfbf7f9b1759/builder/azure/common/vault.go#L145-L153 |
165,205 | hashicorp/packer | template/parse.go | MarshalJSON | func (r *rawTemplate) MarshalJSON() ([]byte, error) {
// Avoid recursion
type rawTemplate_ rawTemplate
out, _ := json.Marshal(rawTemplate_(*r))
var m map[string]json.RawMessage
_ = json.Unmarshal(out, &m)
// Flatten Comments
delete(m, "comments")
for _, comment := range r.Comments {
for k, v := range comment {
out, _ = json.Marshal(v)
m[k] = out
}
}
return json.Marshal(m)
} | go | func (r *rawTemplate) MarshalJSON() ([]byte, error) {
// Avoid recursion
type rawTemplate_ rawTemplate
out, _ := json.Marshal(rawTemplate_(*r))
var m map[string]json.RawMessage
_ = json.Unmarshal(out, &m)
// Flatten Comments
delete(m, "comments")
for _, comment := range r.Comments {
for k, v := range comment {
out, _ = json.Marshal(v)
m[k] = out
}
}
return json.Marshal(m)
} | [
"func",
"(",
"r",
"*",
"rawTemplate",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"// Avoid recursion",
"type",
"rawTemplate_",
"rawTemplate",
"\n",
"out",
",",
"_",
":=",
"json",
".",
"Marshal",
"(",
"rawTemplate_",
"(",
"*",
"r",
")",
")",
"\n\n",
"var",
"m",
"map",
"[",
"string",
"]",
"json",
".",
"RawMessage",
"\n",
"_",
"=",
"json",
".",
"Unmarshal",
"(",
"out",
",",
"&",
"m",
")",
"\n\n",
"// Flatten Comments",
"delete",
"(",
"m",
",",
"\"",
"\"",
")",
"\n",
"for",
"_",
",",
"comment",
":=",
"range",
"r",
".",
"Comments",
"{",
"for",
"k",
",",
"v",
":=",
"range",
"comment",
"{",
"out",
",",
"_",
"=",
"json",
".",
"Marshal",
"(",
"v",
")",
"\n",
"m",
"[",
"k",
"]",
"=",
"out",
"\n",
"}",
"\n",
"}",
"\n\n",
"return",
"json",
".",
"Marshal",
"(",
"m",
")",
"\n",
"}"
] | // MarshalJSON conducts the necessary flattening of the rawTemplate struct
// to provide valid Packer template JSON | [
"MarshalJSON",
"conducts",
"the",
"necessary",
"flattening",
"of",
"the",
"rawTemplate",
"struct",
"to",
"provide",
"valid",
"Packer",
"template",
"JSON"
] | d343852c15da050ee3ad039cc4cadfbf7f9b1759 | https://github.com/hashicorp/packer/blob/d343852c15da050ee3ad039cc4cadfbf7f9b1759/template/parse.go#L39-L57 |
165,206 | hashicorp/packer | template/parse.go | Parse | func Parse(r io.Reader) (*Template, error) {
// Create a buffer to copy what we read
var buf bytes.Buffer
if _, err := buf.ReadFrom(r); err != nil {
return nil, err
}
// First, decode the object into an interface{}. We do this instead of
// the rawTemplate directly because we'd rather use mapstructure to
// decode since it has richer errors.
var raw interface{}
if err := json.Unmarshal(buf.Bytes(), &raw); err != nil {
return nil, err
}
// Create our decoder
var md mapstructure.Metadata
var rawTpl rawTemplate
rawTpl.RawContents = buf.Bytes()
decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{
Metadata: &md,
Result: &rawTpl,
})
if err != nil {
return nil, err
}
// Do the actual decode into our structure
if err := decoder.Decode(raw); err != nil {
return nil, err
}
// Build an error if there are unused root level keys
if len(md.Unused) > 0 {
sort.Strings(md.Unused)
unusedMap, ok := raw.(map[string]interface{})
if !ok {
return nil, fmt.Errorf("Failed to convert unused root level keys to map")
}
for _, unused := range md.Unused {
if unused[0] == '_' {
commentVal, ok := unusedMap[unused].(string)
if !ok {
return nil, fmt.Errorf("Failed to cast root level comment value to string")
}
comment := map[string]string{
unused: commentVal,
}
rawTpl.Comments = append(rawTpl.Comments, comment)
continue
}
err = multierror.Append(err, fmt.Errorf(
"Unknown root level key in template: '%s'", unused))
}
}
if err != nil {
return nil, err
}
// Return the template parsed from the raw structure
return rawTpl.Template()
} | go | func Parse(r io.Reader) (*Template, error) {
// Create a buffer to copy what we read
var buf bytes.Buffer
if _, err := buf.ReadFrom(r); err != nil {
return nil, err
}
// First, decode the object into an interface{}. We do this instead of
// the rawTemplate directly because we'd rather use mapstructure to
// decode since it has richer errors.
var raw interface{}
if err := json.Unmarshal(buf.Bytes(), &raw); err != nil {
return nil, err
}
// Create our decoder
var md mapstructure.Metadata
var rawTpl rawTemplate
rawTpl.RawContents = buf.Bytes()
decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{
Metadata: &md,
Result: &rawTpl,
})
if err != nil {
return nil, err
}
// Do the actual decode into our structure
if err := decoder.Decode(raw); err != nil {
return nil, err
}
// Build an error if there are unused root level keys
if len(md.Unused) > 0 {
sort.Strings(md.Unused)
unusedMap, ok := raw.(map[string]interface{})
if !ok {
return nil, fmt.Errorf("Failed to convert unused root level keys to map")
}
for _, unused := range md.Unused {
if unused[0] == '_' {
commentVal, ok := unusedMap[unused].(string)
if !ok {
return nil, fmt.Errorf("Failed to cast root level comment value to string")
}
comment := map[string]string{
unused: commentVal,
}
rawTpl.Comments = append(rawTpl.Comments, comment)
continue
}
err = multierror.Append(err, fmt.Errorf(
"Unknown root level key in template: '%s'", unused))
}
}
if err != nil {
return nil, err
}
// Return the template parsed from the raw structure
return rawTpl.Template()
} | [
"func",
"Parse",
"(",
"r",
"io",
".",
"Reader",
")",
"(",
"*",
"Template",
",",
"error",
")",
"{",
"// Create a buffer to copy what we read",
"var",
"buf",
"bytes",
".",
"Buffer",
"\n",
"if",
"_",
",",
"err",
":=",
"buf",
".",
"ReadFrom",
"(",
"r",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"// First, decode the object into an interface{}. We do this instead of",
"// the rawTemplate directly because we'd rather use mapstructure to",
"// decode since it has richer errors.",
"var",
"raw",
"interface",
"{",
"}",
"\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"buf",
".",
"Bytes",
"(",
")",
",",
"&",
"raw",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"// Create our decoder",
"var",
"md",
"mapstructure",
".",
"Metadata",
"\n",
"var",
"rawTpl",
"rawTemplate",
"\n",
"rawTpl",
".",
"RawContents",
"=",
"buf",
".",
"Bytes",
"(",
")",
"\n",
"decoder",
",",
"err",
":=",
"mapstructure",
".",
"NewDecoder",
"(",
"&",
"mapstructure",
".",
"DecoderConfig",
"{",
"Metadata",
":",
"&",
"md",
",",
"Result",
":",
"&",
"rawTpl",
",",
"}",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"// Do the actual decode into our structure",
"if",
"err",
":=",
"decoder",
".",
"Decode",
"(",
"raw",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"// Build an error if there are unused root level keys",
"if",
"len",
"(",
"md",
".",
"Unused",
")",
">",
"0",
"{",
"sort",
".",
"Strings",
"(",
"md",
".",
"Unused",
")",
"\n\n",
"unusedMap",
",",
"ok",
":=",
"raw",
".",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n",
"if",
"!",
"ok",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"for",
"_",
",",
"unused",
":=",
"range",
"md",
".",
"Unused",
"{",
"if",
"unused",
"[",
"0",
"]",
"==",
"'_'",
"{",
"commentVal",
",",
"ok",
":=",
"unusedMap",
"[",
"unused",
"]",
".",
"(",
"string",
")",
"\n",
"if",
"!",
"ok",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"comment",
":=",
"map",
"[",
"string",
"]",
"string",
"{",
"unused",
":",
"commentVal",
",",
"}",
"\n\n",
"rawTpl",
".",
"Comments",
"=",
"append",
"(",
"rawTpl",
".",
"Comments",
",",
"comment",
")",
"\n",
"continue",
"\n",
"}",
"\n\n",
"err",
"=",
"multierror",
".",
"Append",
"(",
"err",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"unused",
")",
")",
"\n",
"}",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"// Return the template parsed from the raw structure",
"return",
"rawTpl",
".",
"Template",
"(",
")",
"\n",
"}"
] | // Parse takes the given io.Reader and parses a Template object out of it. | [
"Parse",
"takes",
"the",
"given",
"io",
".",
"Reader",
"and",
"parses",
"a",
"Template",
"object",
"out",
"of",
"it",
"."
] | d343852c15da050ee3ad039cc4cadfbf7f9b1759 | https://github.com/hashicorp/packer/blob/d343852c15da050ee3ad039cc4cadfbf7f9b1759/template/parse.go#L321-L387 |
165,207 | hashicorp/packer | template/parse.go | ParseFile | func ParseFile(path string) (*Template, error) {
var f *os.File
var err error
if path == "-" {
// Create a temp file for stdin in case of errors
f, err = tmp.File("parse")
if err != nil {
return nil, err
}
defer os.Remove(f.Name())
defer f.Close()
io.Copy(f, os.Stdin)
f.Seek(0, os.SEEK_SET)
} else {
f, err = os.Open(path)
if err != nil {
return nil, err
}
defer f.Close()
}
tpl, err := Parse(f)
if err != nil {
syntaxErr, ok := err.(*json.SyntaxError)
if !ok {
return nil, err
}
// Rewind the file and get a better error
f.Seek(0, os.SEEK_SET)
// Grab the error location, and return a string to point to offending syntax error
line, col, highlight := highlightPosition(f, syntaxErr.Offset)
err = fmt.Errorf("Error parsing JSON: %s\nAt line %d, column %d (offset %d):\n%s", err, line, col, syntaxErr.Offset, highlight)
return nil, err
}
if !filepath.IsAbs(path) {
path, err = filepath.Abs(path)
if err != nil {
return nil, err
}
}
tpl.Path = path
return tpl, nil
} | go | func ParseFile(path string) (*Template, error) {
var f *os.File
var err error
if path == "-" {
// Create a temp file for stdin in case of errors
f, err = tmp.File("parse")
if err != nil {
return nil, err
}
defer os.Remove(f.Name())
defer f.Close()
io.Copy(f, os.Stdin)
f.Seek(0, os.SEEK_SET)
} else {
f, err = os.Open(path)
if err != nil {
return nil, err
}
defer f.Close()
}
tpl, err := Parse(f)
if err != nil {
syntaxErr, ok := err.(*json.SyntaxError)
if !ok {
return nil, err
}
// Rewind the file and get a better error
f.Seek(0, os.SEEK_SET)
// Grab the error location, and return a string to point to offending syntax error
line, col, highlight := highlightPosition(f, syntaxErr.Offset)
err = fmt.Errorf("Error parsing JSON: %s\nAt line %d, column %d (offset %d):\n%s", err, line, col, syntaxErr.Offset, highlight)
return nil, err
}
if !filepath.IsAbs(path) {
path, err = filepath.Abs(path)
if err != nil {
return nil, err
}
}
tpl.Path = path
return tpl, nil
} | [
"func",
"ParseFile",
"(",
"path",
"string",
")",
"(",
"*",
"Template",
",",
"error",
")",
"{",
"var",
"f",
"*",
"os",
".",
"File",
"\n",
"var",
"err",
"error",
"\n",
"if",
"path",
"==",
"\"",
"\"",
"{",
"// Create a temp file for stdin in case of errors",
"f",
",",
"err",
"=",
"tmp",
".",
"File",
"(",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n",
"defer",
"os",
".",
"Remove",
"(",
"f",
".",
"Name",
"(",
")",
")",
"\n",
"defer",
"f",
".",
"Close",
"(",
")",
"\n",
"io",
".",
"Copy",
"(",
"f",
",",
"os",
".",
"Stdin",
")",
"\n",
"f",
".",
"Seek",
"(",
"0",
",",
"os",
".",
"SEEK_SET",
")",
"\n",
"}",
"else",
"{",
"f",
",",
"err",
"=",
"os",
".",
"Open",
"(",
"path",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n",
"defer",
"f",
".",
"Close",
"(",
")",
"\n",
"}",
"\n",
"tpl",
",",
"err",
":=",
"Parse",
"(",
"f",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"syntaxErr",
",",
"ok",
":=",
"err",
".",
"(",
"*",
"json",
".",
"SyntaxError",
")",
"\n",
"if",
"!",
"ok",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n",
"// Rewind the file and get a better error",
"f",
".",
"Seek",
"(",
"0",
",",
"os",
".",
"SEEK_SET",
")",
"\n",
"// Grab the error location, and return a string to point to offending syntax error",
"line",
",",
"col",
",",
"highlight",
":=",
"highlightPosition",
"(",
"f",
",",
"syntaxErr",
".",
"Offset",
")",
"\n",
"err",
"=",
"fmt",
".",
"Errorf",
"(",
"\"",
"\\n",
"\\n",
"\"",
",",
"err",
",",
"line",
",",
"col",
",",
"syntaxErr",
".",
"Offset",
",",
"highlight",
")",
"\n",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"if",
"!",
"filepath",
".",
"IsAbs",
"(",
"path",
")",
"{",
"path",
",",
"err",
"=",
"filepath",
".",
"Abs",
"(",
"path",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n",
"}",
"\n\n",
"tpl",
".",
"Path",
"=",
"path",
"\n",
"return",
"tpl",
",",
"nil",
"\n",
"}"
] | // ParseFile is the same as Parse but is a helper to automatically open
// a file for parsing. | [
"ParseFile",
"is",
"the",
"same",
"as",
"Parse",
"but",
"is",
"a",
"helper",
"to",
"automatically",
"open",
"a",
"file",
"for",
"parsing",
"."
] | d343852c15da050ee3ad039cc4cadfbf7f9b1759 | https://github.com/hashicorp/packer/blob/d343852c15da050ee3ad039cc4cadfbf7f9b1759/template/parse.go#L391-L434 |
165,208 | hashicorp/packer | template/parse.go | highlightPosition | func highlightPosition(f *os.File, pos int64) (line, col int, highlight string) {
// Modified version of the function in Camlistore by Brad Fitzpatrick
// https://github.com/camlistore/camlistore/blob/4b5403dd5310cf6e1ae8feb8533fd59262701ebc/vendor/go4.org/errorutil/highlight.go
line = 1
// New io.Reader for file
br := bufio.NewReader(f)
// Initialize lines
lastLine := ""
thisLine := new(bytes.Buffer)
// Loop through template to find line, column
for n := int64(0); n < pos; n++ {
// read byte from io.Reader
b, err := br.ReadByte()
if err != nil {
break
}
// If end of line, save line as previous line in case next line is offender
if b == '\n' {
lastLine = thisLine.String()
thisLine.Reset()
line++
col = 1
} else {
// Write current line, until line is safe, or error point is encountered
col++
thisLine.WriteByte(b)
}
}
// Populate highlight string to place a '^' char at offending column
if line > 1 {
highlight += fmt.Sprintf("%5d: %s\n", line-1, lastLine)
}
highlight += fmt.Sprintf("%5d: %s\n", line, thisLine.String())
highlight += fmt.Sprintf("%s^\n", strings.Repeat(" ", col+5))
return
} | go | func highlightPosition(f *os.File, pos int64) (line, col int, highlight string) {
// Modified version of the function in Camlistore by Brad Fitzpatrick
// https://github.com/camlistore/camlistore/blob/4b5403dd5310cf6e1ae8feb8533fd59262701ebc/vendor/go4.org/errorutil/highlight.go
line = 1
// New io.Reader for file
br := bufio.NewReader(f)
// Initialize lines
lastLine := ""
thisLine := new(bytes.Buffer)
// Loop through template to find line, column
for n := int64(0); n < pos; n++ {
// read byte from io.Reader
b, err := br.ReadByte()
if err != nil {
break
}
// If end of line, save line as previous line in case next line is offender
if b == '\n' {
lastLine = thisLine.String()
thisLine.Reset()
line++
col = 1
} else {
// Write current line, until line is safe, or error point is encountered
col++
thisLine.WriteByte(b)
}
}
// Populate highlight string to place a '^' char at offending column
if line > 1 {
highlight += fmt.Sprintf("%5d: %s\n", line-1, lastLine)
}
highlight += fmt.Sprintf("%5d: %s\n", line, thisLine.String())
highlight += fmt.Sprintf("%s^\n", strings.Repeat(" ", col+5))
return
} | [
"func",
"highlightPosition",
"(",
"f",
"*",
"os",
".",
"File",
",",
"pos",
"int64",
")",
"(",
"line",
",",
"col",
"int",
",",
"highlight",
"string",
")",
"{",
"// Modified version of the function in Camlistore by Brad Fitzpatrick",
"// https://github.com/camlistore/camlistore/blob/4b5403dd5310cf6e1ae8feb8533fd59262701ebc/vendor/go4.org/errorutil/highlight.go",
"line",
"=",
"1",
"\n",
"// New io.Reader for file",
"br",
":=",
"bufio",
".",
"NewReader",
"(",
"f",
")",
"\n",
"// Initialize lines",
"lastLine",
":=",
"\"",
"\"",
"\n",
"thisLine",
":=",
"new",
"(",
"bytes",
".",
"Buffer",
")",
"\n",
"// Loop through template to find line, column",
"for",
"n",
":=",
"int64",
"(",
"0",
")",
";",
"n",
"<",
"pos",
";",
"n",
"++",
"{",
"// read byte from io.Reader",
"b",
",",
"err",
":=",
"br",
".",
"ReadByte",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"break",
"\n",
"}",
"\n",
"// If end of line, save line as previous line in case next line is offender",
"if",
"b",
"==",
"'\\n'",
"{",
"lastLine",
"=",
"thisLine",
".",
"String",
"(",
")",
"\n",
"thisLine",
".",
"Reset",
"(",
")",
"\n",
"line",
"++",
"\n",
"col",
"=",
"1",
"\n",
"}",
"else",
"{",
"// Write current line, until line is safe, or error point is encountered",
"col",
"++",
"\n",
"thisLine",
".",
"WriteByte",
"(",
"b",
")",
"\n",
"}",
"\n",
"}",
"\n\n",
"// Populate highlight string to place a '^' char at offending column",
"if",
"line",
">",
"1",
"{",
"highlight",
"+=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\\n",
"\"",
",",
"line",
"-",
"1",
",",
"lastLine",
")",
"\n",
"}",
"\n\n",
"highlight",
"+=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\\n",
"\"",
",",
"line",
",",
"thisLine",
".",
"String",
"(",
")",
")",
"\n",
"highlight",
"+=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\\n",
"\"",
",",
"strings",
".",
"Repeat",
"(",
"\"",
"\"",
",",
"col",
"+",
"5",
")",
")",
"\n",
"return",
"\n",
"}"
] | // Takes a file and the location in bytes of a parse error
// from json.SyntaxError.Offset and returns the line, column,
// and pretty-printed context around the error with an arrow indicating the exact
// position of the syntax error. | [
"Takes",
"a",
"file",
"and",
"the",
"location",
"in",
"bytes",
"of",
"a",
"parse",
"error",
"from",
"json",
".",
"SyntaxError",
".",
"Offset",
"and",
"returns",
"the",
"line",
"column",
"and",
"pretty",
"-",
"printed",
"context",
"around",
"the",
"error",
"with",
"an",
"arrow",
"indicating",
"the",
"exact",
"position",
"of",
"the",
"syntax",
"error",
"."
] | d343852c15da050ee3ad039cc4cadfbf7f9b1759 | https://github.com/hashicorp/packer/blob/d343852c15da050ee3ad039cc4cadfbf7f9b1759/template/parse.go#L440-L477 |
165,209 | hashicorp/packer | builder/parallels/common/prlctl_version_config.go | Prepare | func (c *PrlctlVersionConfig) Prepare(ctx *interpolate.Context) []error {
if c.PrlctlVersionFile == "" {
c.PrlctlVersionFile = ".prlctl_version"
}
return nil
} | go | func (c *PrlctlVersionConfig) Prepare(ctx *interpolate.Context) []error {
if c.PrlctlVersionFile == "" {
c.PrlctlVersionFile = ".prlctl_version"
}
return nil
} | [
"func",
"(",
"c",
"*",
"PrlctlVersionConfig",
")",
"Prepare",
"(",
"ctx",
"*",
"interpolate",
".",
"Context",
")",
"[",
"]",
"error",
"{",
"if",
"c",
".",
"PrlctlVersionFile",
"==",
"\"",
"\"",
"{",
"c",
".",
"PrlctlVersionFile",
"=",
"\"",
"\"",
"\n",
"}",
"\n\n",
"return",
"nil",
"\n",
"}"
] | // Prepare sets the default value of "PrlctlVersionFile" property. | [
"Prepare",
"sets",
"the",
"default",
"value",
"of",
"PrlctlVersionFile",
"property",
"."
] | d343852c15da050ee3ad039cc4cadfbf7f9b1759 | https://github.com/hashicorp/packer/blob/d343852c15da050ee3ad039cc4cadfbf7f9b1759/builder/parallels/common/prlctl_version_config.go#L13-L19 |
165,210 | hashicorp/packer | builder/openstack/volume.go | WaitForVolume | func WaitForVolume(blockStorageClient *gophercloud.ServiceClient, volumeID string) error {
maxNumErrors := 10
numErrors := 0
for {
status, err := GetVolumeStatus(blockStorageClient, volumeID)
if err != nil {
errCode, ok := err.(*gophercloud.ErrUnexpectedResponseCode)
if ok && (errCode.Actual == 500 || errCode.Actual == 404) {
numErrors++
if numErrors >= maxNumErrors {
log.Printf("[ERROR] Maximum number of errors (%d) reached; failing with: %s", numErrors, err)
return err
}
log.Printf("[ERROR] %d error received, will ignore and retry: %s", errCode.Actual, err)
time.Sleep(2 * time.Second)
continue
}
return err
}
if status == "available" {
return nil
}
log.Printf("Waiting for volume creation status: %s", status)
time.Sleep(2 * time.Second)
}
} | go | func WaitForVolume(blockStorageClient *gophercloud.ServiceClient, volumeID string) error {
maxNumErrors := 10
numErrors := 0
for {
status, err := GetVolumeStatus(blockStorageClient, volumeID)
if err != nil {
errCode, ok := err.(*gophercloud.ErrUnexpectedResponseCode)
if ok && (errCode.Actual == 500 || errCode.Actual == 404) {
numErrors++
if numErrors >= maxNumErrors {
log.Printf("[ERROR] Maximum number of errors (%d) reached; failing with: %s", numErrors, err)
return err
}
log.Printf("[ERROR] %d error received, will ignore and retry: %s", errCode.Actual, err)
time.Sleep(2 * time.Second)
continue
}
return err
}
if status == "available" {
return nil
}
log.Printf("Waiting for volume creation status: %s", status)
time.Sleep(2 * time.Second)
}
} | [
"func",
"WaitForVolume",
"(",
"blockStorageClient",
"*",
"gophercloud",
".",
"ServiceClient",
",",
"volumeID",
"string",
")",
"error",
"{",
"maxNumErrors",
":=",
"10",
"\n",
"numErrors",
":=",
"0",
"\n\n",
"for",
"{",
"status",
",",
"err",
":=",
"GetVolumeStatus",
"(",
"blockStorageClient",
",",
"volumeID",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"errCode",
",",
"ok",
":=",
"err",
".",
"(",
"*",
"gophercloud",
".",
"ErrUnexpectedResponseCode",
")",
"\n",
"if",
"ok",
"&&",
"(",
"errCode",
".",
"Actual",
"==",
"500",
"||",
"errCode",
".",
"Actual",
"==",
"404",
")",
"{",
"numErrors",
"++",
"\n",
"if",
"numErrors",
">=",
"maxNumErrors",
"{",
"log",
".",
"Printf",
"(",
"\"",
"\"",
",",
"numErrors",
",",
"err",
")",
"\n",
"return",
"err",
"\n",
"}",
"\n",
"log",
".",
"Printf",
"(",
"\"",
"\"",
",",
"errCode",
".",
"Actual",
",",
"err",
")",
"\n",
"time",
".",
"Sleep",
"(",
"2",
"*",
"time",
".",
"Second",
")",
"\n",
"continue",
"\n",
"}",
"\n\n",
"return",
"err",
"\n",
"}",
"\n\n",
"if",
"status",
"==",
"\"",
"\"",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"log",
".",
"Printf",
"(",
"\"",
"\"",
",",
"status",
")",
"\n",
"time",
".",
"Sleep",
"(",
"2",
"*",
"time",
".",
"Second",
")",
"\n",
"}",
"\n",
"}"
] | // WaitForVolume waits for the given volume to become available. | [
"WaitForVolume",
"waits",
"for",
"the",
"given",
"volume",
"to",
"become",
"available",
"."
] | d343852c15da050ee3ad039cc4cadfbf7f9b1759 | https://github.com/hashicorp/packer/blob/d343852c15da050ee3ad039cc4cadfbf7f9b1759/builder/openstack/volume.go#L13-L42 |
165,211 | hashicorp/packer | builder/openstack/volume.go | GetVolumeSize | func GetVolumeSize(imageClient *gophercloud.ServiceClient, imageID string) (int, error) {
sourceImage, err := images.Get(imageClient, imageID).Extract()
if err != nil {
return 0, err
}
if sourceImage.MinDiskGigabytes != 0 {
return sourceImage.MinDiskGigabytes, nil
}
volumeSizeMB := sourceImage.SizeBytes / 1024 / 1024
volumeSizeGB := int(sourceImage.SizeBytes / 1024 / 1024 / 1024)
// Increment gigabytes size if the initial size can't be divided without
// remainder.
if volumeSizeMB%1024 > 0 {
volumeSizeGB++
}
return volumeSizeGB, nil
} | go | func GetVolumeSize(imageClient *gophercloud.ServiceClient, imageID string) (int, error) {
sourceImage, err := images.Get(imageClient, imageID).Extract()
if err != nil {
return 0, err
}
if sourceImage.MinDiskGigabytes != 0 {
return sourceImage.MinDiskGigabytes, nil
}
volumeSizeMB := sourceImage.SizeBytes / 1024 / 1024
volumeSizeGB := int(sourceImage.SizeBytes / 1024 / 1024 / 1024)
// Increment gigabytes size if the initial size can't be divided without
// remainder.
if volumeSizeMB%1024 > 0 {
volumeSizeGB++
}
return volumeSizeGB, nil
} | [
"func",
"GetVolumeSize",
"(",
"imageClient",
"*",
"gophercloud",
".",
"ServiceClient",
",",
"imageID",
"string",
")",
"(",
"int",
",",
"error",
")",
"{",
"sourceImage",
",",
"err",
":=",
"images",
".",
"Get",
"(",
"imageClient",
",",
"imageID",
")",
".",
"Extract",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"0",
",",
"err",
"\n",
"}",
"\n\n",
"if",
"sourceImage",
".",
"MinDiskGigabytes",
"!=",
"0",
"{",
"return",
"sourceImage",
".",
"MinDiskGigabytes",
",",
"nil",
"\n",
"}",
"\n\n",
"volumeSizeMB",
":=",
"sourceImage",
".",
"SizeBytes",
"/",
"1024",
"/",
"1024",
"\n",
"volumeSizeGB",
":=",
"int",
"(",
"sourceImage",
".",
"SizeBytes",
"/",
"1024",
"/",
"1024",
"/",
"1024",
")",
"\n\n",
"// Increment gigabytes size if the initial size can't be divided without",
"// remainder.",
"if",
"volumeSizeMB",
"%",
"1024",
">",
"0",
"{",
"volumeSizeGB",
"++",
"\n",
"}",
"\n\n",
"return",
"volumeSizeGB",
",",
"nil",
"\n",
"}"
] | // GetVolumeSize returns volume size in gigabytes based on the image min disk
// value if it's not empty.
// Or it calculates needed gigabytes size from the image bytes size. | [
"GetVolumeSize",
"returns",
"volume",
"size",
"in",
"gigabytes",
"based",
"on",
"the",
"image",
"min",
"disk",
"value",
"if",
"it",
"s",
"not",
"empty",
".",
"Or",
"it",
"calculates",
"needed",
"gigabytes",
"size",
"from",
"the",
"image",
"bytes",
"size",
"."
] | d343852c15da050ee3ad039cc4cadfbf7f9b1759 | https://github.com/hashicorp/packer/blob/d343852c15da050ee3ad039cc4cadfbf7f9b1759/builder/openstack/volume.go#L47-L67 |
165,212 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetCloudFormationStackARN | func (s *ApplicationSource) SetCloudFormationStackARN(v string) *ApplicationSource {
s.CloudFormationStackARN = &v
return s
} | go | func (s *ApplicationSource) SetCloudFormationStackARN(v string) *ApplicationSource {
s.CloudFormationStackARN = &v
return s
} | [
"func",
"(",
"s",
"*",
"ApplicationSource",
")",
"SetCloudFormationStackARN",
"(",
"v",
"string",
")",
"*",
"ApplicationSource",
"{",
"s",
".",
"CloudFormationStackARN",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetCloudFormationStackARN sets the CloudFormationStackARN field's value. | [
"SetCloudFormationStackARN",
"sets",
"the",
"CloudFormationStackARN",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L601-L604 |
165,213 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetScalingPlanResources | func (s *DescribeScalingPlanResourcesOutput) SetScalingPlanResources(v []*ScalingPlanResource) *DescribeScalingPlanResourcesOutput {
s.ScalingPlanResources = v
return s
} | go | func (s *DescribeScalingPlanResourcesOutput) SetScalingPlanResources(v []*ScalingPlanResource) *DescribeScalingPlanResourcesOutput {
s.ScalingPlanResources = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeScalingPlanResourcesOutput",
")",
"SetScalingPlanResources",
"(",
"v",
"[",
"]",
"*",
"ScalingPlanResource",
")",
"*",
"DescribeScalingPlanResourcesOutput",
"{",
"s",
".",
"ScalingPlanResources",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetScalingPlanResources sets the ScalingPlanResources field's value. | [
"SetScalingPlanResources",
"sets",
"the",
"ScalingPlanResources",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L1161-L1164 |
165,214 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetApplicationSources | func (s *DescribeScalingPlansInput) SetApplicationSources(v []*ApplicationSource) *DescribeScalingPlansInput {
s.ApplicationSources = v
return s
} | go | func (s *DescribeScalingPlansInput) SetApplicationSources(v []*ApplicationSource) *DescribeScalingPlansInput {
s.ApplicationSources = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeScalingPlansInput",
")",
"SetApplicationSources",
"(",
"v",
"[",
"]",
"*",
"ApplicationSource",
")",
"*",
"DescribeScalingPlansInput",
"{",
"s",
".",
"ApplicationSources",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetApplicationSources sets the ApplicationSources field's value. | [
"SetApplicationSources",
"sets",
"the",
"ApplicationSources",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L1220-L1223 |
165,215 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetScalingPlanNames | func (s *DescribeScalingPlansInput) SetScalingPlanNames(v []*string) *DescribeScalingPlansInput {
s.ScalingPlanNames = v
return s
} | go | func (s *DescribeScalingPlansInput) SetScalingPlanNames(v []*string) *DescribeScalingPlansInput {
s.ScalingPlanNames = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeScalingPlansInput",
")",
"SetScalingPlanNames",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"DescribeScalingPlansInput",
"{",
"s",
".",
"ScalingPlanNames",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetScalingPlanNames sets the ScalingPlanNames field's value. | [
"SetScalingPlanNames",
"sets",
"the",
"ScalingPlanNames",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L1238-L1241 |
165,216 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetScalingPlans | func (s *DescribeScalingPlansOutput) SetScalingPlans(v []*ScalingPlan) *DescribeScalingPlansOutput {
s.ScalingPlans = v
return s
} | go | func (s *DescribeScalingPlansOutput) SetScalingPlans(v []*ScalingPlan) *DescribeScalingPlansOutput {
s.ScalingPlans = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeScalingPlansOutput",
")",
"SetScalingPlans",
"(",
"v",
"[",
"]",
"*",
"ScalingPlan",
")",
"*",
"DescribeScalingPlansOutput",
"{",
"s",
".",
"ScalingPlans",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetScalingPlans sets the ScalingPlans field's value. | [
"SetScalingPlans",
"sets",
"the",
"ScalingPlans",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L1277-L1280 |
165,217 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetForecastDataType | func (s *GetScalingPlanResourceForecastDataInput) SetForecastDataType(v string) *GetScalingPlanResourceForecastDataInput {
s.ForecastDataType = &v
return s
} | go | func (s *GetScalingPlanResourceForecastDataInput) SetForecastDataType(v string) *GetScalingPlanResourceForecastDataInput {
s.ForecastDataType = &v
return s
} | [
"func",
"(",
"s",
"*",
"GetScalingPlanResourceForecastDataInput",
")",
"SetForecastDataType",
"(",
"v",
"string",
")",
"*",
"GetScalingPlanResourceForecastDataInput",
"{",
"s",
".",
"ForecastDataType",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetForecastDataType sets the ForecastDataType field's value. | [
"SetForecastDataType",
"sets",
"the",
"ForecastDataType",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L1417-L1420 |
165,218 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetPredefinedLoadMetricType | func (s *PredefinedLoadMetricSpecification) SetPredefinedLoadMetricType(v string) *PredefinedLoadMetricSpecification {
s.PredefinedLoadMetricType = &v
return s
} | go | func (s *PredefinedLoadMetricSpecification) SetPredefinedLoadMetricType(v string) *PredefinedLoadMetricSpecification {
s.PredefinedLoadMetricType = &v
return s
} | [
"func",
"(",
"s",
"*",
"PredefinedLoadMetricSpecification",
")",
"SetPredefinedLoadMetricType",
"(",
"v",
"string",
")",
"*",
"PredefinedLoadMetricSpecification",
"{",
"s",
".",
"PredefinedLoadMetricType",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetPredefinedLoadMetricType sets the PredefinedLoadMetricType field's value. | [
"SetPredefinedLoadMetricType",
"sets",
"the",
"PredefinedLoadMetricType",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L1588-L1591 |
165,219 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetPredefinedScalingMetricType | func (s *PredefinedScalingMetricSpecification) SetPredefinedScalingMetricType(v string) *PredefinedScalingMetricSpecification {
s.PredefinedScalingMetricType = &v
return s
} | go | func (s *PredefinedScalingMetricSpecification) SetPredefinedScalingMetricType(v string) *PredefinedScalingMetricSpecification {
s.PredefinedScalingMetricType = &v
return s
} | [
"func",
"(",
"s",
"*",
"PredefinedScalingMetricSpecification",
")",
"SetPredefinedScalingMetricType",
"(",
"v",
"string",
")",
"*",
"PredefinedScalingMetricSpecification",
"{",
"s",
".",
"PredefinedScalingMetricType",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetPredefinedScalingMetricType sets the PredefinedScalingMetricType field's value. | [
"SetPredefinedScalingMetricType",
"sets",
"the",
"PredefinedScalingMetricType",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L1653-L1656 |
165,220 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetCustomizedLoadMetricSpecification | func (s *ScalingInstruction) SetCustomizedLoadMetricSpecification(v *CustomizedLoadMetricSpecification) *ScalingInstruction {
s.CustomizedLoadMetricSpecification = v
return s
} | go | func (s *ScalingInstruction) SetCustomizedLoadMetricSpecification(v *CustomizedLoadMetricSpecification) *ScalingInstruction {
s.CustomizedLoadMetricSpecification = v
return s
} | [
"func",
"(",
"s",
"*",
"ScalingInstruction",
")",
"SetCustomizedLoadMetricSpecification",
"(",
"v",
"*",
"CustomizedLoadMetricSpecification",
")",
"*",
"ScalingInstruction",
"{",
"s",
".",
"CustomizedLoadMetricSpecification",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetCustomizedLoadMetricSpecification sets the CustomizedLoadMetricSpecification field's value. | [
"SetCustomizedLoadMetricSpecification",
"sets",
"the",
"CustomizedLoadMetricSpecification",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L1923-L1926 |
165,221 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetDisableDynamicScaling | func (s *ScalingInstruction) SetDisableDynamicScaling(v bool) *ScalingInstruction {
s.DisableDynamicScaling = &v
return s
} | go | func (s *ScalingInstruction) SetDisableDynamicScaling(v bool) *ScalingInstruction {
s.DisableDynamicScaling = &v
return s
} | [
"func",
"(",
"s",
"*",
"ScalingInstruction",
")",
"SetDisableDynamicScaling",
"(",
"v",
"bool",
")",
"*",
"ScalingInstruction",
"{",
"s",
".",
"DisableDynamicScaling",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetDisableDynamicScaling sets the DisableDynamicScaling field's value. | [
"SetDisableDynamicScaling",
"sets",
"the",
"DisableDynamicScaling",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L1929-L1932 |
165,222 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetPredefinedLoadMetricSpecification | func (s *ScalingInstruction) SetPredefinedLoadMetricSpecification(v *PredefinedLoadMetricSpecification) *ScalingInstruction {
s.PredefinedLoadMetricSpecification = v
return s
} | go | func (s *ScalingInstruction) SetPredefinedLoadMetricSpecification(v *PredefinedLoadMetricSpecification) *ScalingInstruction {
s.PredefinedLoadMetricSpecification = v
return s
} | [
"func",
"(",
"s",
"*",
"ScalingInstruction",
")",
"SetPredefinedLoadMetricSpecification",
"(",
"v",
"*",
"PredefinedLoadMetricSpecification",
")",
"*",
"ScalingInstruction",
"{",
"s",
".",
"PredefinedLoadMetricSpecification",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetPredefinedLoadMetricSpecification sets the PredefinedLoadMetricSpecification field's value. | [
"SetPredefinedLoadMetricSpecification",
"sets",
"the",
"PredefinedLoadMetricSpecification",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L1947-L1950 |
165,223 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetPredictiveScalingMaxCapacityBehavior | func (s *ScalingInstruction) SetPredictiveScalingMaxCapacityBehavior(v string) *ScalingInstruction {
s.PredictiveScalingMaxCapacityBehavior = &v
return s
} | go | func (s *ScalingInstruction) SetPredictiveScalingMaxCapacityBehavior(v string) *ScalingInstruction {
s.PredictiveScalingMaxCapacityBehavior = &v
return s
} | [
"func",
"(",
"s",
"*",
"ScalingInstruction",
")",
"SetPredictiveScalingMaxCapacityBehavior",
"(",
"v",
"string",
")",
"*",
"ScalingInstruction",
"{",
"s",
".",
"PredictiveScalingMaxCapacityBehavior",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetPredictiveScalingMaxCapacityBehavior sets the PredictiveScalingMaxCapacityBehavior field's value. | [
"SetPredictiveScalingMaxCapacityBehavior",
"sets",
"the",
"PredictiveScalingMaxCapacityBehavior",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L1953-L1956 |
165,224 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetPredictiveScalingMaxCapacityBuffer | func (s *ScalingInstruction) SetPredictiveScalingMaxCapacityBuffer(v int64) *ScalingInstruction {
s.PredictiveScalingMaxCapacityBuffer = &v
return s
} | go | func (s *ScalingInstruction) SetPredictiveScalingMaxCapacityBuffer(v int64) *ScalingInstruction {
s.PredictiveScalingMaxCapacityBuffer = &v
return s
} | [
"func",
"(",
"s",
"*",
"ScalingInstruction",
")",
"SetPredictiveScalingMaxCapacityBuffer",
"(",
"v",
"int64",
")",
"*",
"ScalingInstruction",
"{",
"s",
".",
"PredictiveScalingMaxCapacityBuffer",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetPredictiveScalingMaxCapacityBuffer sets the PredictiveScalingMaxCapacityBuffer field's value. | [
"SetPredictiveScalingMaxCapacityBuffer",
"sets",
"the",
"PredictiveScalingMaxCapacityBuffer",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L1959-L1962 |
165,225 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetPredictiveScalingMode | func (s *ScalingInstruction) SetPredictiveScalingMode(v string) *ScalingInstruction {
s.PredictiveScalingMode = &v
return s
} | go | func (s *ScalingInstruction) SetPredictiveScalingMode(v string) *ScalingInstruction {
s.PredictiveScalingMode = &v
return s
} | [
"func",
"(",
"s",
"*",
"ScalingInstruction",
")",
"SetPredictiveScalingMode",
"(",
"v",
"string",
")",
"*",
"ScalingInstruction",
"{",
"s",
".",
"PredictiveScalingMode",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetPredictiveScalingMode sets the PredictiveScalingMode field's value. | [
"SetPredictiveScalingMode",
"sets",
"the",
"PredictiveScalingMode",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L1965-L1968 |
165,226 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetScalingPolicyUpdateBehavior | func (s *ScalingInstruction) SetScalingPolicyUpdateBehavior(v string) *ScalingInstruction {
s.ScalingPolicyUpdateBehavior = &v
return s
} | go | func (s *ScalingInstruction) SetScalingPolicyUpdateBehavior(v string) *ScalingInstruction {
s.ScalingPolicyUpdateBehavior = &v
return s
} | [
"func",
"(",
"s",
"*",
"ScalingInstruction",
")",
"SetScalingPolicyUpdateBehavior",
"(",
"v",
"string",
")",
"*",
"ScalingInstruction",
"{",
"s",
".",
"ScalingPolicyUpdateBehavior",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetScalingPolicyUpdateBehavior sets the ScalingPolicyUpdateBehavior field's value. | [
"SetScalingPolicyUpdateBehavior",
"sets",
"the",
"ScalingPolicyUpdateBehavior",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L1983-L1986 |
165,227 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetScheduledActionBufferTime | func (s *ScalingInstruction) SetScheduledActionBufferTime(v int64) *ScalingInstruction {
s.ScheduledActionBufferTime = &v
return s
} | go | func (s *ScalingInstruction) SetScheduledActionBufferTime(v int64) *ScalingInstruction {
s.ScheduledActionBufferTime = &v
return s
} | [
"func",
"(",
"s",
"*",
"ScalingInstruction",
")",
"SetScheduledActionBufferTime",
"(",
"v",
"int64",
")",
"*",
"ScalingInstruction",
"{",
"s",
".",
"ScheduledActionBufferTime",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetScheduledActionBufferTime sets the ScheduledActionBufferTime field's value. | [
"SetScheduledActionBufferTime",
"sets",
"the",
"ScheduledActionBufferTime",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L1989-L1992 |
165,228 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetTargetTrackingConfigurations | func (s *ScalingInstruction) SetTargetTrackingConfigurations(v []*TargetTrackingConfiguration) *ScalingInstruction {
s.TargetTrackingConfigurations = v
return s
} | go | func (s *ScalingInstruction) SetTargetTrackingConfigurations(v []*TargetTrackingConfiguration) *ScalingInstruction {
s.TargetTrackingConfigurations = v
return s
} | [
"func",
"(",
"s",
"*",
"ScalingInstruction",
")",
"SetTargetTrackingConfigurations",
"(",
"v",
"[",
"]",
"*",
"TargetTrackingConfiguration",
")",
"*",
"ScalingInstruction",
"{",
"s",
".",
"TargetTrackingConfigurations",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetTargetTrackingConfigurations sets the TargetTrackingConfigurations field's value. | [
"SetTargetTrackingConfigurations",
"sets",
"the",
"TargetTrackingConfigurations",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L2001-L2004 |
165,229 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetStatusStartTime | func (s *ScalingPlan) SetStatusStartTime(v time.Time) *ScalingPlan {
s.StatusStartTime = &v
return s
} | go | func (s *ScalingPlan) SetStatusStartTime(v time.Time) *ScalingPlan {
s.StatusStartTime = &v
return s
} | [
"func",
"(",
"s",
"*",
"ScalingPlan",
")",
"SetStatusStartTime",
"(",
"v",
"time",
".",
"Time",
")",
"*",
"ScalingPlan",
"{",
"s",
".",
"StatusStartTime",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetStatusStartTime sets the StatusStartTime field's value. | [
"SetStatusStartTime",
"sets",
"the",
"StatusStartTime",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L2115-L2118 |
165,230 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetScalingStatusCode | func (s *ScalingPlanResource) SetScalingStatusCode(v string) *ScalingPlanResource {
s.ScalingStatusCode = &v
return s
} | go | func (s *ScalingPlanResource) SetScalingStatusCode(v string) *ScalingPlanResource {
s.ScalingStatusCode = &v
return s
} | [
"func",
"(",
"s",
"*",
"ScalingPlanResource",
")",
"SetScalingStatusCode",
"(",
"v",
"string",
")",
"*",
"ScalingPlanResource",
"{",
"s",
".",
"ScalingStatusCode",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetScalingStatusCode sets the ScalingStatusCode field's value. | [
"SetScalingStatusCode",
"sets",
"the",
"ScalingStatusCode",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L2255-L2258 |
165,231 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetScalingStatusMessage | func (s *ScalingPlanResource) SetScalingStatusMessage(v string) *ScalingPlanResource {
s.ScalingStatusMessage = &v
return s
} | go | func (s *ScalingPlanResource) SetScalingStatusMessage(v string) *ScalingPlanResource {
s.ScalingStatusMessage = &v
return s
} | [
"func",
"(",
"s",
"*",
"ScalingPlanResource",
")",
"SetScalingStatusMessage",
"(",
"v",
"string",
")",
"*",
"ScalingPlanResource",
"{",
"s",
".",
"ScalingStatusMessage",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetScalingStatusMessage sets the ScalingStatusMessage field's value. | [
"SetScalingStatusMessage",
"sets",
"the",
"ScalingStatusMessage",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L2261-L2264 |
165,232 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetCustomizedScalingMetricSpecification | func (s *TargetTrackingConfiguration) SetCustomizedScalingMetricSpecification(v *CustomizedScalingMetricSpecification) *TargetTrackingConfiguration {
s.CustomizedScalingMetricSpecification = v
return s
} | go | func (s *TargetTrackingConfiguration) SetCustomizedScalingMetricSpecification(v *CustomizedScalingMetricSpecification) *TargetTrackingConfiguration {
s.CustomizedScalingMetricSpecification = v
return s
} | [
"func",
"(",
"s",
"*",
"TargetTrackingConfiguration",
")",
"SetCustomizedScalingMetricSpecification",
"(",
"v",
"*",
"CustomizedScalingMetricSpecification",
")",
"*",
"TargetTrackingConfiguration",
"{",
"s",
".",
"CustomizedScalingMetricSpecification",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetCustomizedScalingMetricSpecification sets the CustomizedScalingMetricSpecification field's value. | [
"SetCustomizedScalingMetricSpecification",
"sets",
"the",
"CustomizedScalingMetricSpecification",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L2454-L2457 |
165,233 | aws/aws-sdk-go | service/autoscalingplans/api.go | SetPredefinedScalingMetricSpecification | func (s *TargetTrackingConfiguration) SetPredefinedScalingMetricSpecification(v *PredefinedScalingMetricSpecification) *TargetTrackingConfiguration {
s.PredefinedScalingMetricSpecification = v
return s
} | go | func (s *TargetTrackingConfiguration) SetPredefinedScalingMetricSpecification(v *PredefinedScalingMetricSpecification) *TargetTrackingConfiguration {
s.PredefinedScalingMetricSpecification = v
return s
} | [
"func",
"(",
"s",
"*",
"TargetTrackingConfiguration",
")",
"SetPredefinedScalingMetricSpecification",
"(",
"v",
"*",
"PredefinedScalingMetricSpecification",
")",
"*",
"TargetTrackingConfiguration",
"{",
"s",
".",
"PredefinedScalingMetricSpecification",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetPredefinedScalingMetricSpecification sets the PredefinedScalingMetricSpecification field's value. | [
"SetPredefinedScalingMetricSpecification",
"sets",
"the",
"PredefinedScalingMetricSpecification",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/autoscalingplans/api.go#L2472-L2475 |
165,234 | aws/aws-sdk-go | service/s3/s3crypto/cipher.go | Close | func (rc *CryptoReadCloser) Close() error {
rc.isClosed = true
return rc.Body.Close()
} | go | func (rc *CryptoReadCloser) Close() error {
rc.isClosed = true
return rc.Body.Close()
} | [
"func",
"(",
"rc",
"*",
"CryptoReadCloser",
")",
"Close",
"(",
")",
"error",
"{",
"rc",
".",
"isClosed",
"=",
"true",
"\n",
"return",
"rc",
".",
"Body",
".",
"Close",
"(",
")",
"\n",
"}"
] | // Close lets the CryptoReadCloser satisfy io.ReadCloser interface | [
"Close",
"lets",
"the",
"CryptoReadCloser",
"satisfy",
"io",
".",
"ReadCloser",
"interface"
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/s3crypto/cipher.go#L32-L35 |
165,235 | aws/aws-sdk-go | service/s3/s3crypto/cipher.go | Read | func (rc *CryptoReadCloser) Read(b []byte) (int, error) {
if rc.isClosed {
return 0, io.EOF
}
return rc.Decrypter.Read(b)
} | go | func (rc *CryptoReadCloser) Read(b []byte) (int, error) {
if rc.isClosed {
return 0, io.EOF
}
return rc.Decrypter.Read(b)
} | [
"func",
"(",
"rc",
"*",
"CryptoReadCloser",
")",
"Read",
"(",
"b",
"[",
"]",
"byte",
")",
"(",
"int",
",",
"error",
")",
"{",
"if",
"rc",
".",
"isClosed",
"{",
"return",
"0",
",",
"io",
".",
"EOF",
"\n",
"}",
"\n",
"return",
"rc",
".",
"Decrypter",
".",
"Read",
"(",
"b",
")",
"\n",
"}"
] | // Read lets the CryptoReadCloser satisfy io.ReadCloser interface | [
"Read",
"lets",
"the",
"CryptoReadCloser",
"satisfy",
"io",
".",
"ReadCloser",
"interface"
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/s3crypto/cipher.go#L38-L43 |
165,236 | aws/aws-sdk-go | aws/awsutil/prettify.go | Prettify | func Prettify(i interface{}) string {
var buf bytes.Buffer
prettify(reflect.ValueOf(i), 0, &buf)
return buf.String()
} | go | func Prettify(i interface{}) string {
var buf bytes.Buffer
prettify(reflect.ValueOf(i), 0, &buf)
return buf.String()
} | [
"func",
"Prettify",
"(",
"i",
"interface",
"{",
"}",
")",
"string",
"{",
"var",
"buf",
"bytes",
".",
"Buffer",
"\n",
"prettify",
"(",
"reflect",
".",
"ValueOf",
"(",
"i",
")",
",",
"0",
",",
"&",
"buf",
")",
"\n",
"return",
"buf",
".",
"String",
"(",
")",
"\n",
"}"
] | // Prettify returns the string representation of a value. | [
"Prettify",
"returns",
"the",
"string",
"representation",
"of",
"a",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/awsutil/prettify.go#L12-L16 |
165,237 | aws/aws-sdk-go | aws/awsutil/prettify.go | prettify | func prettify(v reflect.Value, indent int, buf *bytes.Buffer) {
for v.Kind() == reflect.Ptr {
v = v.Elem()
}
switch v.Kind() {
case reflect.Struct:
strtype := v.Type().String()
if strtype == "time.Time" {
fmt.Fprintf(buf, "%s", v.Interface())
break
} else if strings.HasPrefix(strtype, "io.") {
buf.WriteString("<buffer>")
break
}
buf.WriteString("{\n")
names := []string{}
for i := 0; i < v.Type().NumField(); i++ {
name := v.Type().Field(i).Name
f := v.Field(i)
if name[0:1] == strings.ToLower(name[0:1]) {
continue // ignore unexported fields
}
if (f.Kind() == reflect.Ptr || f.Kind() == reflect.Slice || f.Kind() == reflect.Map) && f.IsNil() {
continue // ignore unset fields
}
names = append(names, name)
}
for i, n := range names {
val := v.FieldByName(n)
buf.WriteString(strings.Repeat(" ", indent+2))
buf.WriteString(n + ": ")
prettify(val, indent+2, buf)
if i < len(names)-1 {
buf.WriteString(",\n")
}
}
buf.WriteString("\n" + strings.Repeat(" ", indent) + "}")
case reflect.Slice:
strtype := v.Type().String()
if strtype == "[]uint8" {
fmt.Fprintf(buf, "<binary> len %d", v.Len())
break
}
nl, id, id2 := "", "", ""
if v.Len() > 3 {
nl, id, id2 = "\n", strings.Repeat(" ", indent), strings.Repeat(" ", indent+2)
}
buf.WriteString("[" + nl)
for i := 0; i < v.Len(); i++ {
buf.WriteString(id2)
prettify(v.Index(i), indent+2, buf)
if i < v.Len()-1 {
buf.WriteString("," + nl)
}
}
buf.WriteString(nl + id + "]")
case reflect.Map:
buf.WriteString("{\n")
for i, k := range v.MapKeys() {
buf.WriteString(strings.Repeat(" ", indent+2))
buf.WriteString(k.String() + ": ")
prettify(v.MapIndex(k), indent+2, buf)
if i < v.Len()-1 {
buf.WriteString(",\n")
}
}
buf.WriteString("\n" + strings.Repeat(" ", indent) + "}")
default:
if !v.IsValid() {
fmt.Fprint(buf, "<invalid value>")
return
}
format := "%v"
switch v.Interface().(type) {
case string:
format = "%q"
case io.ReadSeeker, io.Reader:
format = "buffer(%p)"
}
fmt.Fprintf(buf, format, v.Interface())
}
} | go | func prettify(v reflect.Value, indent int, buf *bytes.Buffer) {
for v.Kind() == reflect.Ptr {
v = v.Elem()
}
switch v.Kind() {
case reflect.Struct:
strtype := v.Type().String()
if strtype == "time.Time" {
fmt.Fprintf(buf, "%s", v.Interface())
break
} else if strings.HasPrefix(strtype, "io.") {
buf.WriteString("<buffer>")
break
}
buf.WriteString("{\n")
names := []string{}
for i := 0; i < v.Type().NumField(); i++ {
name := v.Type().Field(i).Name
f := v.Field(i)
if name[0:1] == strings.ToLower(name[0:1]) {
continue // ignore unexported fields
}
if (f.Kind() == reflect.Ptr || f.Kind() == reflect.Slice || f.Kind() == reflect.Map) && f.IsNil() {
continue // ignore unset fields
}
names = append(names, name)
}
for i, n := range names {
val := v.FieldByName(n)
buf.WriteString(strings.Repeat(" ", indent+2))
buf.WriteString(n + ": ")
prettify(val, indent+2, buf)
if i < len(names)-1 {
buf.WriteString(",\n")
}
}
buf.WriteString("\n" + strings.Repeat(" ", indent) + "}")
case reflect.Slice:
strtype := v.Type().String()
if strtype == "[]uint8" {
fmt.Fprintf(buf, "<binary> len %d", v.Len())
break
}
nl, id, id2 := "", "", ""
if v.Len() > 3 {
nl, id, id2 = "\n", strings.Repeat(" ", indent), strings.Repeat(" ", indent+2)
}
buf.WriteString("[" + nl)
for i := 0; i < v.Len(); i++ {
buf.WriteString(id2)
prettify(v.Index(i), indent+2, buf)
if i < v.Len()-1 {
buf.WriteString("," + nl)
}
}
buf.WriteString(nl + id + "]")
case reflect.Map:
buf.WriteString("{\n")
for i, k := range v.MapKeys() {
buf.WriteString(strings.Repeat(" ", indent+2))
buf.WriteString(k.String() + ": ")
prettify(v.MapIndex(k), indent+2, buf)
if i < v.Len()-1 {
buf.WriteString(",\n")
}
}
buf.WriteString("\n" + strings.Repeat(" ", indent) + "}")
default:
if !v.IsValid() {
fmt.Fprint(buf, "<invalid value>")
return
}
format := "%v"
switch v.Interface().(type) {
case string:
format = "%q"
case io.ReadSeeker, io.Reader:
format = "buffer(%p)"
}
fmt.Fprintf(buf, format, v.Interface())
}
} | [
"func",
"prettify",
"(",
"v",
"reflect",
".",
"Value",
",",
"indent",
"int",
",",
"buf",
"*",
"bytes",
".",
"Buffer",
")",
"{",
"for",
"v",
".",
"Kind",
"(",
")",
"==",
"reflect",
".",
"Ptr",
"{",
"v",
"=",
"v",
".",
"Elem",
"(",
")",
"\n",
"}",
"\n\n",
"switch",
"v",
".",
"Kind",
"(",
")",
"{",
"case",
"reflect",
".",
"Struct",
":",
"strtype",
":=",
"v",
".",
"Type",
"(",
")",
".",
"String",
"(",
")",
"\n",
"if",
"strtype",
"==",
"\"",
"\"",
"{",
"fmt",
".",
"Fprintf",
"(",
"buf",
",",
"\"",
"\"",
",",
"v",
".",
"Interface",
"(",
")",
")",
"\n",
"break",
"\n",
"}",
"else",
"if",
"strings",
".",
"HasPrefix",
"(",
"strtype",
",",
"\"",
"\"",
")",
"{",
"buf",
".",
"WriteString",
"(",
"\"",
"\"",
")",
"\n",
"break",
"\n",
"}",
"\n\n",
"buf",
".",
"WriteString",
"(",
"\"",
"\\n",
"\"",
")",
"\n\n",
"names",
":=",
"[",
"]",
"string",
"{",
"}",
"\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"v",
".",
"Type",
"(",
")",
".",
"NumField",
"(",
")",
";",
"i",
"++",
"{",
"name",
":=",
"v",
".",
"Type",
"(",
")",
".",
"Field",
"(",
"i",
")",
".",
"Name",
"\n",
"f",
":=",
"v",
".",
"Field",
"(",
"i",
")",
"\n",
"if",
"name",
"[",
"0",
":",
"1",
"]",
"==",
"strings",
".",
"ToLower",
"(",
"name",
"[",
"0",
":",
"1",
"]",
")",
"{",
"continue",
"// ignore unexported fields",
"\n",
"}",
"\n",
"if",
"(",
"f",
".",
"Kind",
"(",
")",
"==",
"reflect",
".",
"Ptr",
"||",
"f",
".",
"Kind",
"(",
")",
"==",
"reflect",
".",
"Slice",
"||",
"f",
".",
"Kind",
"(",
")",
"==",
"reflect",
".",
"Map",
")",
"&&",
"f",
".",
"IsNil",
"(",
")",
"{",
"continue",
"// ignore unset fields",
"\n",
"}",
"\n",
"names",
"=",
"append",
"(",
"names",
",",
"name",
")",
"\n",
"}",
"\n\n",
"for",
"i",
",",
"n",
":=",
"range",
"names",
"{",
"val",
":=",
"v",
".",
"FieldByName",
"(",
"n",
")",
"\n",
"buf",
".",
"WriteString",
"(",
"strings",
".",
"Repeat",
"(",
"\"",
"\"",
",",
"indent",
"+",
"2",
")",
")",
"\n",
"buf",
".",
"WriteString",
"(",
"n",
"+",
"\"",
"\"",
")",
"\n",
"prettify",
"(",
"val",
",",
"indent",
"+",
"2",
",",
"buf",
")",
"\n\n",
"if",
"i",
"<",
"len",
"(",
"names",
")",
"-",
"1",
"{",
"buf",
".",
"WriteString",
"(",
"\"",
"\\n",
"\"",
")",
"\n",
"}",
"\n",
"}",
"\n\n",
"buf",
".",
"WriteString",
"(",
"\"",
"\\n",
"\"",
"+",
"strings",
".",
"Repeat",
"(",
"\"",
"\"",
",",
"indent",
")",
"+",
"\"",
"\"",
")",
"\n",
"case",
"reflect",
".",
"Slice",
":",
"strtype",
":=",
"v",
".",
"Type",
"(",
")",
".",
"String",
"(",
")",
"\n",
"if",
"strtype",
"==",
"\"",
"\"",
"{",
"fmt",
".",
"Fprintf",
"(",
"buf",
",",
"\"",
"\"",
",",
"v",
".",
"Len",
"(",
")",
")",
"\n",
"break",
"\n",
"}",
"\n\n",
"nl",
",",
"id",
",",
"id2",
":=",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
"\n",
"if",
"v",
".",
"Len",
"(",
")",
">",
"3",
"{",
"nl",
",",
"id",
",",
"id2",
"=",
"\"",
"\\n",
"\"",
",",
"strings",
".",
"Repeat",
"(",
"\"",
"\"",
",",
"indent",
")",
",",
"strings",
".",
"Repeat",
"(",
"\"",
"\"",
",",
"indent",
"+",
"2",
")",
"\n",
"}",
"\n",
"buf",
".",
"WriteString",
"(",
"\"",
"\"",
"+",
"nl",
")",
"\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"v",
".",
"Len",
"(",
")",
";",
"i",
"++",
"{",
"buf",
".",
"WriteString",
"(",
"id2",
")",
"\n",
"prettify",
"(",
"v",
".",
"Index",
"(",
"i",
")",
",",
"indent",
"+",
"2",
",",
"buf",
")",
"\n\n",
"if",
"i",
"<",
"v",
".",
"Len",
"(",
")",
"-",
"1",
"{",
"buf",
".",
"WriteString",
"(",
"\"",
"\"",
"+",
"nl",
")",
"\n",
"}",
"\n",
"}",
"\n\n",
"buf",
".",
"WriteString",
"(",
"nl",
"+",
"id",
"+",
"\"",
"\"",
")",
"\n",
"case",
"reflect",
".",
"Map",
":",
"buf",
".",
"WriteString",
"(",
"\"",
"\\n",
"\"",
")",
"\n\n",
"for",
"i",
",",
"k",
":=",
"range",
"v",
".",
"MapKeys",
"(",
")",
"{",
"buf",
".",
"WriteString",
"(",
"strings",
".",
"Repeat",
"(",
"\"",
"\"",
",",
"indent",
"+",
"2",
")",
")",
"\n",
"buf",
".",
"WriteString",
"(",
"k",
".",
"String",
"(",
")",
"+",
"\"",
"\"",
")",
"\n",
"prettify",
"(",
"v",
".",
"MapIndex",
"(",
"k",
")",
",",
"indent",
"+",
"2",
",",
"buf",
")",
"\n\n",
"if",
"i",
"<",
"v",
".",
"Len",
"(",
")",
"-",
"1",
"{",
"buf",
".",
"WriteString",
"(",
"\"",
"\\n",
"\"",
")",
"\n",
"}",
"\n",
"}",
"\n\n",
"buf",
".",
"WriteString",
"(",
"\"",
"\\n",
"\"",
"+",
"strings",
".",
"Repeat",
"(",
"\"",
"\"",
",",
"indent",
")",
"+",
"\"",
"\"",
")",
"\n",
"default",
":",
"if",
"!",
"v",
".",
"IsValid",
"(",
")",
"{",
"fmt",
".",
"Fprint",
"(",
"buf",
",",
"\"",
"\"",
")",
"\n",
"return",
"\n",
"}",
"\n",
"format",
":=",
"\"",
"\"",
"\n",
"switch",
"v",
".",
"Interface",
"(",
")",
".",
"(",
"type",
")",
"{",
"case",
"string",
":",
"format",
"=",
"\"",
"\"",
"\n",
"case",
"io",
".",
"ReadSeeker",
",",
"io",
".",
"Reader",
":",
"format",
"=",
"\"",
"\"",
"\n",
"}",
"\n",
"fmt",
".",
"Fprintf",
"(",
"buf",
",",
"format",
",",
"v",
".",
"Interface",
"(",
")",
")",
"\n",
"}",
"\n",
"}"
] | // prettify will recursively walk value v to build a textual
// representation of the value. | [
"prettify",
"will",
"recursively",
"walk",
"value",
"v",
"to",
"build",
"a",
"textual",
"representation",
"of",
"the",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/awsutil/prettify.go#L20-L113 |
165,238 | aws/aws-sdk-go | service/kinesisvideo/api.go | SetStreamInfo | func (s *DescribeStreamOutput) SetStreamInfo(v *StreamInfo) *DescribeStreamOutput {
s.StreamInfo = v
return s
} | go | func (s *DescribeStreamOutput) SetStreamInfo(v *StreamInfo) *DescribeStreamOutput {
s.StreamInfo = v
return s
} | [
"func",
"(",
"s",
"*",
"DescribeStreamOutput",
")",
"SetStreamInfo",
"(",
"v",
"*",
"StreamInfo",
")",
"*",
"DescribeStreamOutput",
"{",
"s",
".",
"StreamInfo",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetStreamInfo sets the StreamInfo field's value. | [
"SetStreamInfo",
"sets",
"the",
"StreamInfo",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/kinesisvideo/api.go#L1314-L1317 |
165,239 | aws/aws-sdk-go | service/kinesisvideo/api.go | SetAPIName | func (s *GetDataEndpointInput) SetAPIName(v string) *GetDataEndpointInput {
s.APIName = &v
return s
} | go | func (s *GetDataEndpointInput) SetAPIName(v string) *GetDataEndpointInput {
s.APIName = &v
return s
} | [
"func",
"(",
"s",
"*",
"GetDataEndpointInput",
")",
"SetAPIName",
"(",
"v",
"string",
")",
"*",
"GetDataEndpointInput",
"{",
"s",
".",
"APIName",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetAPIName sets the APIName field's value. | [
"SetAPIName",
"sets",
"the",
"APIName",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/kinesisvideo/api.go#L1366-L1369 |
165,240 | aws/aws-sdk-go | service/kinesisvideo/api.go | SetDataEndpoint | func (s *GetDataEndpointOutput) SetDataEndpoint(v string) *GetDataEndpointOutput {
s.DataEndpoint = &v
return s
} | go | func (s *GetDataEndpointOutput) SetDataEndpoint(v string) *GetDataEndpointOutput {
s.DataEndpoint = &v
return s
} | [
"func",
"(",
"s",
"*",
"GetDataEndpointOutput",
")",
"SetDataEndpoint",
"(",
"v",
"string",
")",
"*",
"GetDataEndpointOutput",
"{",
"s",
".",
"DataEndpoint",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetDataEndpoint sets the DataEndpoint field's value. | [
"SetDataEndpoint",
"sets",
"the",
"DataEndpoint",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/kinesisvideo/api.go#L1402-L1405 |
165,241 | aws/aws-sdk-go | service/kinesisvideo/api.go | SetStreamNameCondition | func (s *ListStreamsInput) SetStreamNameCondition(v *StreamNameCondition) *ListStreamsInput {
s.StreamNameCondition = v
return s
} | go | func (s *ListStreamsInput) SetStreamNameCondition(v *StreamNameCondition) *ListStreamsInput {
s.StreamNameCondition = v
return s
} | [
"func",
"(",
"s",
"*",
"ListStreamsInput",
")",
"SetStreamNameCondition",
"(",
"v",
"*",
"StreamNameCondition",
")",
"*",
"ListStreamsInput",
"{",
"s",
".",
"StreamNameCondition",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetStreamNameCondition sets the StreamNameCondition field's value. | [
"SetStreamNameCondition",
"sets",
"the",
"StreamNameCondition",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/kinesisvideo/api.go#L1464-L1467 |
165,242 | aws/aws-sdk-go | service/kinesisvideo/api.go | SetStreamInfoList | func (s *ListStreamsOutput) SetStreamInfoList(v []*StreamInfo) *ListStreamsOutput {
s.StreamInfoList = v
return s
} | go | func (s *ListStreamsOutput) SetStreamInfoList(v []*StreamInfo) *ListStreamsOutput {
s.StreamInfoList = v
return s
} | [
"func",
"(",
"s",
"*",
"ListStreamsOutput",
")",
"SetStreamInfoList",
"(",
"v",
"[",
"]",
"*",
"StreamInfo",
")",
"*",
"ListStreamsOutput",
"{",
"s",
".",
"StreamInfoList",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetStreamInfoList sets the StreamInfoList field's value. | [
"SetStreamInfoList",
"sets",
"the",
"StreamInfoList",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/kinesisvideo/api.go#L1497-L1500 |
165,243 | aws/aws-sdk-go | service/kinesisvideo/api.go | SetComparisonValue | func (s *StreamNameCondition) SetComparisonValue(v string) *StreamNameCondition {
s.ComparisonValue = &v
return s
} | go | func (s *StreamNameCondition) SetComparisonValue(v string) *StreamNameCondition {
s.ComparisonValue = &v
return s
} | [
"func",
"(",
"s",
"*",
"StreamNameCondition",
")",
"SetComparisonValue",
"(",
"v",
"string",
")",
"*",
"StreamNameCondition",
"{",
"s",
".",
"ComparisonValue",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetComparisonValue sets the ComparisonValue field's value. | [
"SetComparisonValue",
"sets",
"the",
"ComparisonValue",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/kinesisvideo/api.go#L1737-L1740 |
165,244 | aws/aws-sdk-go | service/kinesisvideo/api.go | SetDataRetentionChangeInHours | func (s *UpdateDataRetentionInput) SetDataRetentionChangeInHours(v int64) *UpdateDataRetentionInput {
s.DataRetentionChangeInHours = &v
return s
} | go | func (s *UpdateDataRetentionInput) SetDataRetentionChangeInHours(v int64) *UpdateDataRetentionInput {
s.DataRetentionChangeInHours = &v
return s
} | [
"func",
"(",
"s",
"*",
"UpdateDataRetentionInput",
")",
"SetDataRetentionChangeInHours",
"(",
"v",
"int64",
")",
"*",
"UpdateDataRetentionInput",
"{",
"s",
".",
"DataRetentionChangeInHours",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetDataRetentionChangeInHours sets the DataRetentionChangeInHours field's value. | [
"SetDataRetentionChangeInHours",
"sets",
"the",
"DataRetentionChangeInHours",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/kinesisvideo/api.go#L1979-L1982 |
165,245 | aws/aws-sdk-go | aws/awserr/types.go | SprintError | func SprintError(code, message, extra string, origErr error) string {
msg := fmt.Sprintf("%s: %s", code, message)
if extra != "" {
msg = fmt.Sprintf("%s\n\t%s", msg, extra)
}
if origErr != nil {
msg = fmt.Sprintf("%s\ncaused by: %s", msg, origErr.Error())
}
return msg
} | go | func SprintError(code, message, extra string, origErr error) string {
msg := fmt.Sprintf("%s: %s", code, message)
if extra != "" {
msg = fmt.Sprintf("%s\n\t%s", msg, extra)
}
if origErr != nil {
msg = fmt.Sprintf("%s\ncaused by: %s", msg, origErr.Error())
}
return msg
} | [
"func",
"SprintError",
"(",
"code",
",",
"message",
",",
"extra",
"string",
",",
"origErr",
"error",
")",
"string",
"{",
"msg",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"code",
",",
"message",
")",
"\n",
"if",
"extra",
"!=",
"\"",
"\"",
"{",
"msg",
"=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\\n",
"\\t",
"\"",
",",
"msg",
",",
"extra",
")",
"\n",
"}",
"\n",
"if",
"origErr",
"!=",
"nil",
"{",
"msg",
"=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\\n",
"\"",
",",
"msg",
",",
"origErr",
".",
"Error",
"(",
")",
")",
"\n",
"}",
"\n",
"return",
"msg",
"\n",
"}"
] | // SprintError returns a string of the formatted error code.
//
// Both extra and origErr are optional. If they are included their lines
// will be added, but if they are not included their lines will be ignored. | [
"SprintError",
"returns",
"a",
"string",
"of",
"the",
"formatted",
"error",
"code",
".",
"Both",
"extra",
"and",
"origErr",
"are",
"optional",
".",
"If",
"they",
"are",
"included",
"their",
"lines",
"will",
"be",
"added",
"but",
"if",
"they",
"are",
"not",
"included",
"their",
"lines",
"will",
"be",
"ignored",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/awserr/types.go#L9-L18 |
165,246 | aws/aws-sdk-go | aws/awserr/types.go | newBaseError | func newBaseError(code, message string, origErrs []error) *baseError {
b := &baseError{
code: code,
message: message,
errs: origErrs,
}
return b
} | go | func newBaseError(code, message string, origErrs []error) *baseError {
b := &baseError{
code: code,
message: message,
errs: origErrs,
}
return b
} | [
"func",
"newBaseError",
"(",
"code",
",",
"message",
"string",
",",
"origErrs",
"[",
"]",
"error",
")",
"*",
"baseError",
"{",
"b",
":=",
"&",
"baseError",
"{",
"code",
":",
"code",
",",
"message",
":",
"message",
",",
"errs",
":",
"origErrs",
",",
"}",
"\n\n",
"return",
"b",
"\n",
"}"
] | // newBaseError returns an error object for the code, message, and errors.
//
// code is a short no whitespace phrase depicting the classification of
// the error that is being created.
//
// message is the free flow string containing detailed information about the
// error.
//
// origErrs is the error objects which will be nested under the new errors to
// be returned. | [
"newBaseError",
"returns",
"an",
"error",
"object",
"for",
"the",
"code",
"message",
"and",
"errors",
".",
"code",
"is",
"a",
"short",
"no",
"whitespace",
"phrase",
"depicting",
"the",
"classification",
"of",
"the",
"error",
"that",
"is",
"being",
"created",
".",
"message",
"is",
"the",
"free",
"flow",
"string",
"containing",
"detailed",
"information",
"about",
"the",
"error",
".",
"origErrs",
"is",
"the",
"error",
"objects",
"which",
"will",
"be",
"nested",
"under",
"the",
"new",
"errors",
"to",
"be",
"returned",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/awserr/types.go#L47-L55 |
165,247 | aws/aws-sdk-go | aws/awserr/types.go | Error | func (b baseError) Error() string {
size := len(b.errs)
if size > 0 {
return SprintError(b.code, b.message, "", errorList(b.errs))
}
return SprintError(b.code, b.message, "", nil)
} | go | func (b baseError) Error() string {
size := len(b.errs)
if size > 0 {
return SprintError(b.code, b.message, "", errorList(b.errs))
}
return SprintError(b.code, b.message, "", nil)
} | [
"func",
"(",
"b",
"baseError",
")",
"Error",
"(",
")",
"string",
"{",
"size",
":=",
"len",
"(",
"b",
".",
"errs",
")",
"\n",
"if",
"size",
">",
"0",
"{",
"return",
"SprintError",
"(",
"b",
".",
"code",
",",
"b",
".",
"message",
",",
"\"",
"\"",
",",
"errorList",
"(",
"b",
".",
"errs",
")",
")",
"\n",
"}",
"\n\n",
"return",
"SprintError",
"(",
"b",
".",
"code",
",",
"b",
".",
"message",
",",
"\"",
"\"",
",",
"nil",
")",
"\n",
"}"
] | // Error returns the string representation of the error.
//
// See ErrorWithExtra for formatting.
//
// Satisfies the error interface. | [
"Error",
"returns",
"the",
"string",
"representation",
"of",
"the",
"error",
".",
"See",
"ErrorWithExtra",
"for",
"formatting",
".",
"Satisfies",
"the",
"error",
"interface",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/awserr/types.go#L62-L69 |
165,248 | aws/aws-sdk-go | aws/awserr/types.go | OrigErr | func (b baseError) OrigErr() error {
switch len(b.errs) {
case 0:
return nil
case 1:
return b.errs[0]
default:
if err, ok := b.errs[0].(Error); ok {
return NewBatchError(err.Code(), err.Message(), b.errs[1:])
}
return NewBatchError("BatchedErrors",
"multiple errors occurred", b.errs)
}
} | go | func (b baseError) OrigErr() error {
switch len(b.errs) {
case 0:
return nil
case 1:
return b.errs[0]
default:
if err, ok := b.errs[0].(Error); ok {
return NewBatchError(err.Code(), err.Message(), b.errs[1:])
}
return NewBatchError("BatchedErrors",
"multiple errors occurred", b.errs)
}
} | [
"func",
"(",
"b",
"baseError",
")",
"OrigErr",
"(",
")",
"error",
"{",
"switch",
"len",
"(",
"b",
".",
"errs",
")",
"{",
"case",
"0",
":",
"return",
"nil",
"\n",
"case",
"1",
":",
"return",
"b",
".",
"errs",
"[",
"0",
"]",
"\n",
"default",
":",
"if",
"err",
",",
"ok",
":=",
"b",
".",
"errs",
"[",
"0",
"]",
".",
"(",
"Error",
")",
";",
"ok",
"{",
"return",
"NewBatchError",
"(",
"err",
".",
"Code",
"(",
")",
",",
"err",
".",
"Message",
"(",
")",
",",
"b",
".",
"errs",
"[",
"1",
":",
"]",
")",
"\n",
"}",
"\n",
"return",
"NewBatchError",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"b",
".",
"errs",
")",
"\n",
"}",
"\n",
"}"
] | // OrigErr returns the original error if one was set. Nil is returned if no
// error was set. This only returns the first element in the list. If the full
// list is needed, use BatchedErrors. | [
"OrigErr",
"returns",
"the",
"original",
"error",
"if",
"one",
"was",
"set",
".",
"Nil",
"is",
"returned",
"if",
"no",
"error",
"was",
"set",
".",
"This",
"only",
"returns",
"the",
"first",
"element",
"in",
"the",
"list",
".",
"If",
"the",
"full",
"list",
"is",
"needed",
"use",
"BatchedErrors",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/awserr/types.go#L90-L103 |
165,249 | aws/aws-sdk-go | aws/awserr/types.go | newRequestError | func newRequestError(err Error, statusCode int, requestID string) *requestError {
return &requestError{
awsError: err,
statusCode: statusCode,
requestID: requestID,
}
} | go | func newRequestError(err Error, statusCode int, requestID string) *requestError {
return &requestError{
awsError: err,
statusCode: statusCode,
requestID: requestID,
}
} | [
"func",
"newRequestError",
"(",
"err",
"Error",
",",
"statusCode",
"int",
",",
"requestID",
"string",
")",
"*",
"requestError",
"{",
"return",
"&",
"requestError",
"{",
"awsError",
":",
"err",
",",
"statusCode",
":",
"statusCode",
",",
"requestID",
":",
"requestID",
",",
"}",
"\n",
"}"
] | // newRequestError returns a wrapped error with additional information for
// request status code, and service requestID.
//
// Should be used to wrap all request which involve service requests. Even if
// the request failed without a service response, but had an HTTP status code
// that may be meaningful.
//
// Also wraps original errors via the baseError. | [
"newRequestError",
"returns",
"a",
"wrapped",
"error",
"with",
"additional",
"information",
"for",
"request",
"status",
"code",
"and",
"service",
"requestID",
".",
"Should",
"be",
"used",
"to",
"wrap",
"all",
"request",
"which",
"involve",
"service",
"requests",
".",
"Even",
"if",
"the",
"request",
"failed",
"without",
"a",
"service",
"response",
"but",
"had",
"an",
"HTTP",
"status",
"code",
"that",
"may",
"be",
"meaningful",
".",
"Also",
"wraps",
"original",
"errors",
"via",
"the",
"baseError",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/awserr/types.go#L132-L138 |
165,250 | aws/aws-sdk-go | aws/awserr/types.go | OrigErrs | func (r requestError) OrigErrs() []error {
if b, ok := r.awsError.(BatchedErrors); ok {
return b.OrigErrs()
}
return []error{r.OrigErr()}
} | go | func (r requestError) OrigErrs() []error {
if b, ok := r.awsError.(BatchedErrors); ok {
return b.OrigErrs()
}
return []error{r.OrigErr()}
} | [
"func",
"(",
"r",
"requestError",
")",
"OrigErrs",
"(",
")",
"[",
"]",
"error",
"{",
"if",
"b",
",",
"ok",
":=",
"r",
".",
"awsError",
".",
"(",
"BatchedErrors",
")",
";",
"ok",
"{",
"return",
"b",
".",
"OrigErrs",
"(",
")",
"\n",
"}",
"\n",
"return",
"[",
"]",
"error",
"{",
"r",
".",
"OrigErr",
"(",
")",
"}",
"\n",
"}"
] | // OrigErrs returns the original errors if one was set. An empty slice is
// returned if no error was set. | [
"OrigErrs",
"returns",
"the",
"original",
"errors",
"if",
"one",
"was",
"set",
".",
"An",
"empty",
"slice",
"is",
"returned",
"if",
"no",
"error",
"was",
"set",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/aws/awserr/types.go#L166-L171 |
165,251 | aws/aws-sdk-go | service/s3/api.go | SetDaysAfterInitiation | func (s *AbortIncompleteMultipartUpload) SetDaysAfterInitiation(v int64) *AbortIncompleteMultipartUpload {
s.DaysAfterInitiation = &v
return s
} | go | func (s *AbortIncompleteMultipartUpload) SetDaysAfterInitiation(v int64) *AbortIncompleteMultipartUpload {
s.DaysAfterInitiation = &v
return s
} | [
"func",
"(",
"s",
"*",
"AbortIncompleteMultipartUpload",
")",
"SetDaysAfterInitiation",
"(",
"v",
"int64",
")",
"*",
"AbortIncompleteMultipartUpload",
"{",
"s",
".",
"DaysAfterInitiation",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetDaysAfterInitiation sets the DaysAfterInitiation field's value. | [
"SetDaysAfterInitiation",
"sets",
"the",
"DaysAfterInitiation",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L7034-L7037 |
165,252 | aws/aws-sdk-go | service/s3/api.go | SetStorageClassAnalysis | func (s *AnalyticsConfiguration) SetStorageClassAnalysis(v *StorageClassAnalysis) *AnalyticsConfiguration {
s.StorageClassAnalysis = v
return s
} | go | func (s *AnalyticsConfiguration) SetStorageClassAnalysis(v *StorageClassAnalysis) *AnalyticsConfiguration {
s.StorageClassAnalysis = v
return s
} | [
"func",
"(",
"s",
"*",
"AnalyticsConfiguration",
")",
"SetStorageClassAnalysis",
"(",
"v",
"*",
"StorageClassAnalysis",
")",
"*",
"AnalyticsConfiguration",
"{",
"s",
".",
"StorageClassAnalysis",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetStorageClassAnalysis sets the StorageClassAnalysis field's value. | [
"SetStorageClassAnalysis",
"sets",
"the",
"StorageClassAnalysis",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L7382-L7385 |
165,253 | aws/aws-sdk-go | service/s3/api.go | SetBucketAccountId | func (s *AnalyticsS3BucketDestination) SetBucketAccountId(v string) *AnalyticsS3BucketDestination {
s.BucketAccountId = &v
return s
} | go | func (s *AnalyticsS3BucketDestination) SetBucketAccountId(v string) *AnalyticsS3BucketDestination {
s.BucketAccountId = &v
return s
} | [
"func",
"(",
"s",
"*",
"AnalyticsS3BucketDestination",
")",
"SetBucketAccountId",
"(",
"v",
"string",
")",
"*",
"AnalyticsS3BucketDestination",
"{",
"s",
".",
"BucketAccountId",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetBucketAccountId sets the BucketAccountId field's value. | [
"SetBucketAccountId",
"sets",
"the",
"BucketAccountId",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L7554-L7557 |
165,254 | aws/aws-sdk-go | service/s3/api.go | SetAllowQuotedRecordDelimiter | func (s *CSVInput) SetAllowQuotedRecordDelimiter(v bool) *CSVInput {
s.AllowQuotedRecordDelimiter = &v
return s
} | go | func (s *CSVInput) SetAllowQuotedRecordDelimiter(v bool) *CSVInput {
s.AllowQuotedRecordDelimiter = &v
return s
} | [
"func",
"(",
"s",
"*",
"CSVInput",
")",
"SetAllowQuotedRecordDelimiter",
"(",
"v",
"bool",
")",
"*",
"CSVInput",
"{",
"s",
".",
"AllowQuotedRecordDelimiter",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetAllowQuotedRecordDelimiter sets the AllowQuotedRecordDelimiter field's value. | [
"SetAllowQuotedRecordDelimiter",
"sets",
"the",
"AllowQuotedRecordDelimiter",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L7859-L7862 |
165,255 | aws/aws-sdk-go | service/s3/api.go | SetFileHeaderInfo | func (s *CSVInput) SetFileHeaderInfo(v string) *CSVInput {
s.FileHeaderInfo = &v
return s
} | go | func (s *CSVInput) SetFileHeaderInfo(v string) *CSVInput {
s.FileHeaderInfo = &v
return s
} | [
"func",
"(",
"s",
"*",
"CSVInput",
")",
"SetFileHeaderInfo",
"(",
"v",
"string",
")",
"*",
"CSVInput",
"{",
"s",
".",
"FileHeaderInfo",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetFileHeaderInfo sets the FileHeaderInfo field's value. | [
"SetFileHeaderInfo",
"sets",
"the",
"FileHeaderInfo",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L7877-L7880 |
165,256 | aws/aws-sdk-go | service/s3/api.go | SetQuoteFields | func (s *CSVOutput) SetQuoteFields(v string) *CSVOutput {
s.QuoteFields = &v
return s
} | go | func (s *CSVOutput) SetQuoteFields(v string) *CSVOutput {
s.QuoteFields = &v
return s
} | [
"func",
"(",
"s",
"*",
"CSVOutput",
")",
"SetQuoteFields",
"(",
"v",
"string",
")",
"*",
"CSVOutput",
"{",
"s",
".",
"QuoteFields",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetQuoteFields sets the QuoteFields field's value. | [
"SetQuoteFields",
"sets",
"the",
"QuoteFields",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L7950-L7953 |
165,257 | aws/aws-sdk-go | service/s3/api.go | SetCloudFunction | func (s *CloudFunctionConfiguration) SetCloudFunction(v string) *CloudFunctionConfiguration {
s.CloudFunction = &v
return s
} | go | func (s *CloudFunctionConfiguration) SetCloudFunction(v string) *CloudFunctionConfiguration {
s.CloudFunction = &v
return s
} | [
"func",
"(",
"s",
"*",
"CloudFunctionConfiguration",
")",
"SetCloudFunction",
"(",
"v",
"string",
")",
"*",
"CloudFunctionConfiguration",
"{",
"s",
".",
"CloudFunction",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetCloudFunction sets the CloudFunction field's value. | [
"SetCloudFunction",
"sets",
"the",
"CloudFunction",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L7991-L7994 |
165,258 | aws/aws-sdk-go | service/s3/api.go | SetMultipartUpload | func (s *CompleteMultipartUploadInput) SetMultipartUpload(v *CompletedMultipartUpload) *CompleteMultipartUploadInput {
s.MultipartUpload = v
return s
} | go | func (s *CompleteMultipartUploadInput) SetMultipartUpload(v *CompletedMultipartUpload) *CompleteMultipartUploadInput {
s.MultipartUpload = v
return s
} | [
"func",
"(",
"s",
"*",
"CompleteMultipartUploadInput",
")",
"SetMultipartUpload",
"(",
"v",
"*",
"CompletedMultipartUpload",
")",
"*",
"CompleteMultipartUploadInput",
"{",
"s",
".",
"MultipartUpload",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetMultipartUpload sets the MultipartUpload field's value. | [
"SetMultipartUpload",
"sets",
"the",
"MultipartUpload",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L8118-L8121 |
165,259 | aws/aws-sdk-go | service/s3/api.go | SetHttpErrorCodeReturnedEquals | func (s *Condition) SetHttpErrorCodeReturnedEquals(v string) *Condition {
s.HttpErrorCodeReturnedEquals = &v
return s
} | go | func (s *Condition) SetHttpErrorCodeReturnedEquals(v string) *Condition {
s.HttpErrorCodeReturnedEquals = &v
return s
} | [
"func",
"(",
"s",
"*",
"Condition",
")",
"SetHttpErrorCodeReturnedEquals",
"(",
"v",
"string",
")",
"*",
"Condition",
"{",
"s",
".",
"HttpErrorCodeReturnedEquals",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetHttpErrorCodeReturnedEquals sets the HttpErrorCodeReturnedEquals field's value. | [
"SetHttpErrorCodeReturnedEquals",
"sets",
"the",
"HttpErrorCodeReturnedEquals",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L8324-L8327 |
165,260 | aws/aws-sdk-go | service/s3/api.go | SetKeyPrefixEquals | func (s *Condition) SetKeyPrefixEquals(v string) *Condition {
s.KeyPrefixEquals = &v
return s
} | go | func (s *Condition) SetKeyPrefixEquals(v string) *Condition {
s.KeyPrefixEquals = &v
return s
} | [
"func",
"(",
"s",
"*",
"Condition",
")",
"SetKeyPrefixEquals",
"(",
"v",
"string",
")",
"*",
"Condition",
"{",
"s",
".",
"KeyPrefixEquals",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetKeyPrefixEquals sets the KeyPrefixEquals field's value. | [
"SetKeyPrefixEquals",
"sets",
"the",
"KeyPrefixEquals",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L8330-L8333 |
165,261 | aws/aws-sdk-go | service/s3/api.go | SetTaggingDirective | func (s *CopyObjectInput) SetTaggingDirective(v string) *CopyObjectInput {
s.TaggingDirective = &v
return s
} | go | func (s *CopyObjectInput) SetTaggingDirective(v string) *CopyObjectInput {
s.TaggingDirective = &v
return s
} | [
"func",
"(",
"s",
"*",
"CopyObjectInput",
")",
"SetTaggingDirective",
"(",
"v",
"string",
")",
"*",
"CopyObjectInput",
"{",
"s",
".",
"TaggingDirective",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetTaggingDirective sets the TaggingDirective field's value. | [
"SetTaggingDirective",
"sets",
"the",
"TaggingDirective",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L8763-L8766 |
165,262 | aws/aws-sdk-go | service/s3/api.go | SetCopyObjectResult | func (s *CopyObjectOutput) SetCopyObjectResult(v *CopyObjectResult) *CopyObjectOutput {
s.CopyObjectResult = v
return s
} | go | func (s *CopyObjectOutput) SetCopyObjectResult(v *CopyObjectResult) *CopyObjectOutput {
s.CopyObjectResult = v
return s
} | [
"func",
"(",
"s",
"*",
"CopyObjectOutput",
")",
"SetCopyObjectResult",
"(",
"v",
"*",
"CopyObjectResult",
")",
"*",
"CopyObjectOutput",
"{",
"s",
".",
"CopyObjectResult",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetCopyObjectResult sets the CopyObjectResult field's value. | [
"SetCopyObjectResult",
"sets",
"the",
"CopyObjectResult",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L8821-L8824 |
165,263 | aws/aws-sdk-go | service/s3/api.go | SetCreateBucketConfiguration | func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput {
s.CreateBucketConfiguration = v
return s
} | go | func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput {
s.CreateBucketConfiguration = v
return s
} | [
"func",
"(",
"s",
"*",
"CreateBucketInput",
")",
"SetCreateBucketConfiguration",
"(",
"v",
"*",
"CreateBucketConfiguration",
")",
"*",
"CreateBucketInput",
"{",
"s",
".",
"CreateBucketConfiguration",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetCreateBucketConfiguration sets the CreateBucketConfiguration field's value. | [
"SetCreateBucketConfiguration",
"sets",
"the",
"CreateBucketConfiguration",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L9037-L9040 |
165,264 | aws/aws-sdk-go | service/s3/api.go | SetObjectLockEnabledForBucket | func (s *CreateBucketInput) SetObjectLockEnabledForBucket(v bool) *CreateBucketInput {
s.ObjectLockEnabledForBucket = &v
return s
} | go | func (s *CreateBucketInput) SetObjectLockEnabledForBucket(v bool) *CreateBucketInput {
s.ObjectLockEnabledForBucket = &v
return s
} | [
"func",
"(",
"s",
"*",
"CreateBucketInput",
")",
"SetObjectLockEnabledForBucket",
"(",
"v",
"bool",
")",
"*",
"CreateBucketInput",
"{",
"s",
".",
"ObjectLockEnabledForBucket",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetObjectLockEnabledForBucket sets the ObjectLockEnabledForBucket field's value. | [
"SetObjectLockEnabledForBucket",
"sets",
"the",
"ObjectLockEnabledForBucket",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L9073-L9076 |
165,265 | aws/aws-sdk-go | service/s3/api.go | SetYears | func (s *DefaultRetention) SetYears(v int64) *DefaultRetention {
s.Years = &v
return s
} | go | func (s *DefaultRetention) SetYears(v int64) *DefaultRetention {
s.Years = &v
return s
} | [
"func",
"(",
"s",
"*",
"DefaultRetention",
")",
"SetYears",
"(",
"v",
"int64",
")",
"*",
"DefaultRetention",
"{",
"s",
".",
"Years",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetYears sets the Years field's value. | [
"SetYears",
"sets",
"the",
"Years",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L9559-L9562 |
165,266 | aws/aws-sdk-go | service/s3/api.go | SetQuiet | func (s *Delete) SetQuiet(v bool) *Delete {
s.Quiet = &v
return s
} | go | func (s *Delete) SetQuiet(v bool) *Delete {
s.Quiet = &v
return s
} | [
"func",
"(",
"s",
"*",
"Delete",
")",
"SetQuiet",
"(",
"v",
"bool",
")",
"*",
"Delete",
"{",
"s",
".",
"Quiet",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetQuiet sets the Quiet field's value. | [
"SetQuiet",
"sets",
"the",
"Quiet",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L9615-L9618 |
165,267 | aws/aws-sdk-go | service/s3/api.go | SetDeleteMarkerVersionId | func (s *DeletedObject) SetDeleteMarkerVersionId(v string) *DeletedObject {
s.DeleteMarkerVersionId = &v
return s
} | go | func (s *DeletedObject) SetDeleteMarkerVersionId(v string) *DeletedObject {
s.DeleteMarkerVersionId = &v
return s
} | [
"func",
"(",
"s",
"*",
"DeletedObject",
")",
"SetDeleteMarkerVersionId",
"(",
"v",
"string",
")",
"*",
"DeletedObject",
"{",
"s",
".",
"DeleteMarkerVersionId",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetDeleteMarkerVersionId sets the DeleteMarkerVersionId field's value. | [
"SetDeleteMarkerVersionId",
"sets",
"the",
"DeleteMarkerVersionId",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L10888-L10891 |
165,268 | aws/aws-sdk-go | service/s3/api.go | SetAccessControlTranslation | func (s *Destination) SetAccessControlTranslation(v *AccessControlTranslation) *Destination {
s.AccessControlTranslation = v
return s
} | go | func (s *Destination) SetAccessControlTranslation(v *AccessControlTranslation) *Destination {
s.AccessControlTranslation = v
return s
} | [
"func",
"(",
"s",
"*",
"Destination",
")",
"SetAccessControlTranslation",
"(",
"v",
"*",
"AccessControlTranslation",
")",
"*",
"Destination",
"{",
"s",
".",
"AccessControlTranslation",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetAccessControlTranslation sets the AccessControlTranslation field's value. | [
"SetAccessControlTranslation",
"sets",
"the",
"AccessControlTranslation",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L10974-L10977 |
165,269 | aws/aws-sdk-go | service/s3/api.go | SetKMSContext | func (s *Encryption) SetKMSContext(v string) *Encryption {
s.KMSContext = &v
return s
} | go | func (s *Encryption) SetKMSContext(v string) *Encryption {
s.KMSContext = &v
return s
} | [
"func",
"(",
"s",
"*",
"Encryption",
")",
"SetKMSContext",
"(",
"v",
"string",
")",
"*",
"Encryption",
"{",
"s",
".",
"KMSContext",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetKMSContext sets the KMSContext field's value. | [
"SetKMSContext",
"sets",
"the",
"KMSContext",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L11060-L11063 |
165,270 | aws/aws-sdk-go | service/s3/api.go | SetKMSKeyId | func (s *Encryption) SetKMSKeyId(v string) *Encryption {
s.KMSKeyId = &v
return s
} | go | func (s *Encryption) SetKMSKeyId(v string) *Encryption {
s.KMSKeyId = &v
return s
} | [
"func",
"(",
"s",
"*",
"Encryption",
")",
"SetKMSKeyId",
"(",
"v",
"string",
")",
"*",
"Encryption",
"{",
"s",
".",
"KMSKeyId",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetKMSKeyId sets the KMSKeyId field's value. | [
"SetKMSKeyId",
"sets",
"the",
"KMSKeyId",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L11066-L11069 |
165,271 | aws/aws-sdk-go | service/s3/api.go | SetReplicaKmsKeyID | func (s *EncryptionConfiguration) SetReplicaKmsKeyID(v string) *EncryptionConfiguration {
s.ReplicaKmsKeyID = &v
return s
} | go | func (s *EncryptionConfiguration) SetReplicaKmsKeyID(v string) *EncryptionConfiguration {
s.ReplicaKmsKeyID = &v
return s
} | [
"func",
"(",
"s",
"*",
"EncryptionConfiguration",
")",
"SetReplicaKmsKeyID",
"(",
"v",
"string",
")",
"*",
"EncryptionConfiguration",
"{",
"s",
".",
"ReplicaKmsKeyID",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetReplicaKmsKeyID sets the ReplicaKmsKeyID field's value. | [
"SetReplicaKmsKeyID",
"sets",
"the",
"ReplicaKmsKeyID",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L11092-L11095 |
165,272 | aws/aws-sdk-go | service/s3/api.go | UnmarshalEvent | func (s *EndEvent) UnmarshalEvent(
payloadUnmarshaler protocol.PayloadUnmarshaler,
msg eventstream.Message,
) error {
return nil
} | go | func (s *EndEvent) UnmarshalEvent(
payloadUnmarshaler protocol.PayloadUnmarshaler,
msg eventstream.Message,
) error {
return nil
} | [
"func",
"(",
"s",
"*",
"EndEvent",
")",
"UnmarshalEvent",
"(",
"payloadUnmarshaler",
"protocol",
".",
"PayloadUnmarshaler",
",",
"msg",
"eventstream",
".",
"Message",
",",
")",
"error",
"{",
"return",
"nil",
"\n",
"}"
] | // UnmarshalEvent unmarshals the EventStream Message into the EndEvent value.
// This method is only used internally within the SDK's EventStream handling. | [
"UnmarshalEvent",
"unmarshals",
"the",
"EventStream",
"Message",
"into",
"the",
"EndEvent",
"value",
".",
"This",
"method",
"is",
"only",
"used",
"internally",
"within",
"the",
"SDK",
"s",
"EventStream",
"handling",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L11116-L11121 |
165,273 | aws/aws-sdk-go | service/s3/api.go | SetResponseCacheControl | func (s *GetObjectInput) SetResponseCacheControl(v string) *GetObjectInput {
s.ResponseCacheControl = &v
return s
} | go | func (s *GetObjectInput) SetResponseCacheControl(v string) *GetObjectInput {
s.ResponseCacheControl = &v
return s
} | [
"func",
"(",
"s",
"*",
"GetObjectInput",
")",
"SetResponseCacheControl",
"(",
"v",
"string",
")",
"*",
"GetObjectInput",
"{",
"s",
".",
"ResponseCacheControl",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetResponseCacheControl sets the ResponseCacheControl field's value. | [
"SetResponseCacheControl",
"sets",
"the",
"ResponseCacheControl",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L12928-L12931 |
165,274 | aws/aws-sdk-go | service/s3/api.go | SetResponseContentDisposition | func (s *GetObjectInput) SetResponseContentDisposition(v string) *GetObjectInput {
s.ResponseContentDisposition = &v
return s
} | go | func (s *GetObjectInput) SetResponseContentDisposition(v string) *GetObjectInput {
s.ResponseContentDisposition = &v
return s
} | [
"func",
"(",
"s",
"*",
"GetObjectInput",
")",
"SetResponseContentDisposition",
"(",
"v",
"string",
")",
"*",
"GetObjectInput",
"{",
"s",
".",
"ResponseContentDisposition",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetResponseContentDisposition sets the ResponseContentDisposition field's value. | [
"SetResponseContentDisposition",
"sets",
"the",
"ResponseContentDisposition",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L12934-L12937 |
165,275 | aws/aws-sdk-go | service/s3/api.go | SetResponseContentEncoding | func (s *GetObjectInput) SetResponseContentEncoding(v string) *GetObjectInput {
s.ResponseContentEncoding = &v
return s
} | go | func (s *GetObjectInput) SetResponseContentEncoding(v string) *GetObjectInput {
s.ResponseContentEncoding = &v
return s
} | [
"func",
"(",
"s",
"*",
"GetObjectInput",
")",
"SetResponseContentEncoding",
"(",
"v",
"string",
")",
"*",
"GetObjectInput",
"{",
"s",
".",
"ResponseContentEncoding",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetResponseContentEncoding sets the ResponseContentEncoding field's value. | [
"SetResponseContentEncoding",
"sets",
"the",
"ResponseContentEncoding",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L12940-L12943 |
165,276 | aws/aws-sdk-go | service/s3/api.go | SetResponseContentLanguage | func (s *GetObjectInput) SetResponseContentLanguage(v string) *GetObjectInput {
s.ResponseContentLanguage = &v
return s
} | go | func (s *GetObjectInput) SetResponseContentLanguage(v string) *GetObjectInput {
s.ResponseContentLanguage = &v
return s
} | [
"func",
"(",
"s",
"*",
"GetObjectInput",
")",
"SetResponseContentLanguage",
"(",
"v",
"string",
")",
"*",
"GetObjectInput",
"{",
"s",
".",
"ResponseContentLanguage",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetResponseContentLanguage sets the ResponseContentLanguage field's value. | [
"SetResponseContentLanguage",
"sets",
"the",
"ResponseContentLanguage",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L12946-L12949 |
165,277 | aws/aws-sdk-go | service/s3/api.go | SetResponseContentType | func (s *GetObjectInput) SetResponseContentType(v string) *GetObjectInput {
s.ResponseContentType = &v
return s
} | go | func (s *GetObjectInput) SetResponseContentType(v string) *GetObjectInput {
s.ResponseContentType = &v
return s
} | [
"func",
"(",
"s",
"*",
"GetObjectInput",
")",
"SetResponseContentType",
"(",
"v",
"string",
")",
"*",
"GetObjectInput",
"{",
"s",
".",
"ResponseContentType",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetResponseContentType sets the ResponseContentType field's value. | [
"SetResponseContentType",
"sets",
"the",
"ResponseContentType",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L12952-L12955 |
165,278 | aws/aws-sdk-go | service/s3/api.go | SetResponseExpires | func (s *GetObjectInput) SetResponseExpires(v time.Time) *GetObjectInput {
s.ResponseExpires = &v
return s
} | go | func (s *GetObjectInput) SetResponseExpires(v time.Time) *GetObjectInput {
s.ResponseExpires = &v
return s
} | [
"func",
"(",
"s",
"*",
"GetObjectInput",
")",
"SetResponseExpires",
"(",
"v",
"time",
".",
"Time",
")",
"*",
"GetObjectInput",
"{",
"s",
".",
"ResponseExpires",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetResponseExpires sets the ResponseExpires field's value. | [
"SetResponseExpires",
"sets",
"the",
"ResponseExpires",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L12958-L12961 |
165,279 | aws/aws-sdk-go | service/s3/api.go | SetTagCount | func (s *GetObjectOutput) SetTagCount(v int64) *GetObjectOutput {
s.TagCount = &v
return s
} | go | func (s *GetObjectOutput) SetTagCount(v int64) *GetObjectOutput {
s.TagCount = &v
return s
} | [
"func",
"(",
"s",
"*",
"GetObjectOutput",
")",
"SetTagCount",
"(",
"v",
"int64",
")",
"*",
"GetObjectOutput",
"{",
"s",
".",
"TagCount",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetTagCount sets the TagCount field's value. | [
"SetTagCount",
"sets",
"the",
"TagCount",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L13468-L13471 |
165,280 | aws/aws-sdk-go | service/s3/api.go | SetSuffix | func (s *IndexDocument) SetSuffix(v string) *IndexDocument {
s.Suffix = &v
return s
} | go | func (s *IndexDocument) SetSuffix(v string) *IndexDocument {
s.Suffix = &v
return s
} | [
"func",
"(",
"s",
"*",
"IndexDocument",
")",
"SetSuffix",
"(",
"v",
"string",
")",
"*",
"IndexDocument",
"{",
"s",
".",
"Suffix",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetSuffix sets the Suffix field's value. | [
"SetSuffix",
"sets",
"the",
"Suffix",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L14593-L14596 |
165,281 | aws/aws-sdk-go | service/s3/api.go | SetParquet | func (s *InputSerialization) SetParquet(v *ParquetInput) *InputSerialization {
s.Parquet = v
return s
} | go | func (s *InputSerialization) SetParquet(v *ParquetInput) *InputSerialization {
s.Parquet = v
return s
} | [
"func",
"(",
"s",
"*",
"InputSerialization",
")",
"SetParquet",
"(",
"v",
"*",
"ParquetInput",
")",
"*",
"InputSerialization",
"{",
"s",
".",
"Parquet",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetParquet sets the Parquet field's value. | [
"SetParquet",
"sets",
"the",
"Parquet",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L14678-L14681 |
165,282 | aws/aws-sdk-go | service/s3/api.go | SetIncludedObjectVersions | func (s *InventoryConfiguration) SetIncludedObjectVersions(v string) *InventoryConfiguration {
s.IncludedObjectVersions = &v
return s
} | go | func (s *InventoryConfiguration) SetIncludedObjectVersions(v string) *InventoryConfiguration {
s.IncludedObjectVersions = &v
return s
} | [
"func",
"(",
"s",
"*",
"InventoryConfiguration",
")",
"SetIncludedObjectVersions",
"(",
"v",
"string",
")",
"*",
"InventoryConfiguration",
"{",
"s",
".",
"IncludedObjectVersions",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetIncludedObjectVersions sets the IncludedObjectVersions field's value. | [
"SetIncludedObjectVersions",
"sets",
"the",
"IncludedObjectVersions",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L14788-L14791 |
165,283 | aws/aws-sdk-go | service/s3/api.go | SetIsEnabled | func (s *InventoryConfiguration) SetIsEnabled(v bool) *InventoryConfiguration {
s.IsEnabled = &v
return s
} | go | func (s *InventoryConfiguration) SetIsEnabled(v bool) *InventoryConfiguration {
s.IsEnabled = &v
return s
} | [
"func",
"(",
"s",
"*",
"InventoryConfiguration",
")",
"SetIsEnabled",
"(",
"v",
"bool",
")",
"*",
"InventoryConfiguration",
"{",
"s",
".",
"IsEnabled",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetIsEnabled sets the IsEnabled field's value. | [
"SetIsEnabled",
"sets",
"the",
"IsEnabled",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L14794-L14797 |
165,284 | aws/aws-sdk-go | service/s3/api.go | SetOptionalFields | func (s *InventoryConfiguration) SetOptionalFields(v []*string) *InventoryConfiguration {
s.OptionalFields = v
return s
} | go | func (s *InventoryConfiguration) SetOptionalFields(v []*string) *InventoryConfiguration {
s.OptionalFields = v
return s
} | [
"func",
"(",
"s",
"*",
"InventoryConfiguration",
")",
"SetOptionalFields",
"(",
"v",
"[",
"]",
"*",
"string",
")",
"*",
"InventoryConfiguration",
"{",
"s",
".",
"OptionalFields",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetOptionalFields sets the OptionalFields field's value. | [
"SetOptionalFields",
"sets",
"the",
"OptionalFields",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L14800-L14803 |
165,285 | aws/aws-sdk-go | service/s3/api.go | SetSSEKMS | func (s *InventoryEncryption) SetSSEKMS(v *SSEKMS) *InventoryEncryption {
s.SSEKMS = v
return s
} | go | func (s *InventoryEncryption) SetSSEKMS(v *SSEKMS) *InventoryEncryption {
s.SSEKMS = v
return s
} | [
"func",
"(",
"s",
"*",
"InventoryEncryption",
")",
"SetSSEKMS",
"(",
"v",
"*",
"SSEKMS",
")",
"*",
"InventoryEncryption",
"{",
"s",
".",
"SSEKMS",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetSSEKMS sets the SSEKMS field's value. | [
"SetSSEKMS",
"sets",
"the",
"SSEKMS",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L14893-L14896 |
165,286 | aws/aws-sdk-go | service/s3/api.go | SetSSES3 | func (s *InventoryEncryption) SetSSES3(v *SSES3) *InventoryEncryption {
s.SSES3 = v
return s
} | go | func (s *InventoryEncryption) SetSSES3(v *SSES3) *InventoryEncryption {
s.SSES3 = v
return s
} | [
"func",
"(",
"s",
"*",
"InventoryEncryption",
")",
"SetSSES3",
"(",
"v",
"*",
"SSES3",
")",
"*",
"InventoryEncryption",
"{",
"s",
".",
"SSES3",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetSSES3 sets the SSES3 field's value. | [
"SetSSES3",
"sets",
"the",
"SSES3",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L14899-L14902 |
165,287 | aws/aws-sdk-go | service/s3/api.go | SetFilterRules | func (s *KeyFilter) SetFilterRules(v []*FilterRule) *KeyFilter {
s.FilterRules = v
return s
} | go | func (s *KeyFilter) SetFilterRules(v []*FilterRule) *KeyFilter {
s.FilterRules = v
return s
} | [
"func",
"(",
"s",
"*",
"KeyFilter",
")",
"SetFilterRules",
"(",
"v",
"[",
"]",
"*",
"FilterRule",
")",
"*",
"KeyFilter",
"{",
"s",
".",
"FilterRules",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetFilterRules sets the FilterRules field's value. | [
"SetFilterRules",
"sets",
"the",
"FilterRules",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L15139-L15142 |
165,288 | aws/aws-sdk-go | service/s3/api.go | SetExpiredObjectDeleteMarker | func (s *LifecycleExpiration) SetExpiredObjectDeleteMarker(v bool) *LifecycleExpiration {
s.ExpiredObjectDeleteMarker = &v
return s
} | go | func (s *LifecycleExpiration) SetExpiredObjectDeleteMarker(v bool) *LifecycleExpiration {
s.ExpiredObjectDeleteMarker = &v
return s
} | [
"func",
"(",
"s",
"*",
"LifecycleExpiration",
")",
"SetExpiredObjectDeleteMarker",
"(",
"v",
"bool",
")",
"*",
"LifecycleExpiration",
"{",
"s",
".",
"ExpiredObjectDeleteMarker",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetExpiredObjectDeleteMarker sets the ExpiredObjectDeleteMarker field's value. | [
"SetExpiredObjectDeleteMarker",
"sets",
"the",
"ExpiredObjectDeleteMarker",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L15304-L15307 |
165,289 | aws/aws-sdk-go | service/s3/api.go | SetNoncurrentVersionTransitions | func (s *LifecycleRule) SetNoncurrentVersionTransitions(v []*NoncurrentVersionTransition) *LifecycleRule {
s.NoncurrentVersionTransitions = v
return s
} | go | func (s *LifecycleRule) SetNoncurrentVersionTransitions(v []*NoncurrentVersionTransition) *LifecycleRule {
s.NoncurrentVersionTransitions = v
return s
} | [
"func",
"(",
"s",
"*",
"LifecycleRule",
")",
"SetNoncurrentVersionTransitions",
"(",
"v",
"[",
"]",
"*",
"NoncurrentVersionTransition",
")",
"*",
"LifecycleRule",
"{",
"s",
".",
"NoncurrentVersionTransitions",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetNoncurrentVersionTransitions sets the NoncurrentVersionTransitions field's value. | [
"SetNoncurrentVersionTransitions",
"sets",
"the",
"NoncurrentVersionTransitions",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L15408-L15411 |
165,290 | aws/aws-sdk-go | service/s3/api.go | SetTransitions | func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule {
s.Transitions = v
return s
} | go | func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule {
s.Transitions = v
return s
} | [
"func",
"(",
"s",
"*",
"LifecycleRule",
")",
"SetTransitions",
"(",
"v",
"[",
"]",
"*",
"Transition",
")",
"*",
"LifecycleRule",
"{",
"s",
".",
"Transitions",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetTransitions sets the Transitions field's value. | [
"SetTransitions",
"sets",
"the",
"Transitions",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L15426-L15429 |
165,291 | aws/aws-sdk-go | service/s3/api.go | SetAnalyticsConfigurationList | func (s *ListBucketAnalyticsConfigurationsOutput) SetAnalyticsConfigurationList(v []*AnalyticsConfiguration) *ListBucketAnalyticsConfigurationsOutput {
s.AnalyticsConfigurationList = v
return s
} | go | func (s *ListBucketAnalyticsConfigurationsOutput) SetAnalyticsConfigurationList(v []*AnalyticsConfiguration) *ListBucketAnalyticsConfigurationsOutput {
s.AnalyticsConfigurationList = v
return s
} | [
"func",
"(",
"s",
"*",
"ListBucketAnalyticsConfigurationsOutput",
")",
"SetAnalyticsConfigurationList",
"(",
"v",
"[",
"]",
"*",
"AnalyticsConfiguration",
")",
"*",
"ListBucketAnalyticsConfigurationsOutput",
"{",
"s",
".",
"AnalyticsConfigurationList",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetAnalyticsConfigurationList sets the AnalyticsConfigurationList field's value. | [
"SetAnalyticsConfigurationList",
"sets",
"the",
"AnalyticsConfigurationList",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L15640-L15643 |
165,292 | aws/aws-sdk-go | service/s3/api.go | SetInventoryConfigurationList | func (s *ListBucketInventoryConfigurationsOutput) SetInventoryConfigurationList(v []*InventoryConfiguration) *ListBucketInventoryConfigurationsOutput {
s.InventoryConfigurationList = v
return s
} | go | func (s *ListBucketInventoryConfigurationsOutput) SetInventoryConfigurationList(v []*InventoryConfiguration) *ListBucketInventoryConfigurationsOutput {
s.InventoryConfigurationList = v
return s
} | [
"func",
"(",
"s",
"*",
"ListBucketInventoryConfigurationsOutput",
")",
"SetInventoryConfigurationList",
"(",
"v",
"[",
"]",
"*",
"InventoryConfiguration",
")",
"*",
"ListBucketInventoryConfigurationsOutput",
"{",
"s",
".",
"InventoryConfigurationList",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetInventoryConfigurationList sets the InventoryConfigurationList field's value. | [
"SetInventoryConfigurationList",
"sets",
"the",
"InventoryConfigurationList",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L15760-L15763 |
165,293 | aws/aws-sdk-go | service/s3/api.go | SetMetricsConfigurationList | func (s *ListBucketMetricsConfigurationsOutput) SetMetricsConfigurationList(v []*MetricsConfiguration) *ListBucketMetricsConfigurationsOutput {
s.MetricsConfigurationList = v
return s
} | go | func (s *ListBucketMetricsConfigurationsOutput) SetMetricsConfigurationList(v []*MetricsConfiguration) *ListBucketMetricsConfigurationsOutput {
s.MetricsConfigurationList = v
return s
} | [
"func",
"(",
"s",
"*",
"ListBucketMetricsConfigurationsOutput",
")",
"SetMetricsConfigurationList",
"(",
"v",
"[",
"]",
"*",
"MetricsConfiguration",
")",
"*",
"ListBucketMetricsConfigurationsOutput",
"{",
"s",
".",
"MetricsConfigurationList",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetMetricsConfigurationList sets the MetricsConfigurationList field's value. | [
"SetMetricsConfigurationList",
"sets",
"the",
"MetricsConfigurationList",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L15882-L15885 |
165,294 | aws/aws-sdk-go | service/s3/api.go | SetNextUploadIdMarker | func (s *ListMultipartUploadsOutput) SetNextUploadIdMarker(v string) *ListMultipartUploadsOutput {
s.NextUploadIdMarker = &v
return s
} | go | func (s *ListMultipartUploadsOutput) SetNextUploadIdMarker(v string) *ListMultipartUploadsOutput {
s.NextUploadIdMarker = &v
return s
} | [
"func",
"(",
"s",
"*",
"ListMultipartUploadsOutput",
")",
"SetNextUploadIdMarker",
"(",
"v",
"string",
")",
"*",
"ListMultipartUploadsOutput",
"{",
"s",
".",
"NextUploadIdMarker",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetNextUploadIdMarker sets the NextUploadIdMarker field's value. | [
"SetNextUploadIdMarker",
"sets",
"the",
"NextUploadIdMarker",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L16158-L16161 |
165,295 | aws/aws-sdk-go | service/s3/api.go | SetDeleteMarkers | func (s *ListObjectVersionsOutput) SetDeleteMarkers(v []*DeleteMarkerEntry) *ListObjectVersionsOutput {
s.DeleteMarkers = v
return s
} | go | func (s *ListObjectVersionsOutput) SetDeleteMarkers(v []*DeleteMarkerEntry) *ListObjectVersionsOutput {
s.DeleteMarkers = v
return s
} | [
"func",
"(",
"s",
"*",
"ListObjectVersionsOutput",
")",
"SetDeleteMarkers",
"(",
"v",
"[",
"]",
"*",
"DeleteMarkerEntry",
")",
"*",
"ListObjectVersionsOutput",
"{",
"s",
".",
"DeleteMarkers",
"=",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetDeleteMarkers sets the DeleteMarkers field's value. | [
"SetDeleteMarkers",
"sets",
"the",
"DeleteMarkers",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L16343-L16346 |
165,296 | aws/aws-sdk-go | service/s3/api.go | SetNextVersionIdMarker | func (s *ListObjectVersionsOutput) SetNextVersionIdMarker(v string) *ListObjectVersionsOutput {
s.NextVersionIdMarker = &v
return s
} | go | func (s *ListObjectVersionsOutput) SetNextVersionIdMarker(v string) *ListObjectVersionsOutput {
s.NextVersionIdMarker = &v
return s
} | [
"func",
"(",
"s",
"*",
"ListObjectVersionsOutput",
")",
"SetNextVersionIdMarker",
"(",
"v",
"string",
")",
"*",
"ListObjectVersionsOutput",
"{",
"s",
".",
"NextVersionIdMarker",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetNextVersionIdMarker sets the NextVersionIdMarker field's value. | [
"SetNextVersionIdMarker",
"sets",
"the",
"NextVersionIdMarker",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L16391-L16394 |
165,297 | aws/aws-sdk-go | service/s3/api.go | SetFetchOwner | func (s *ListObjectsV2Input) SetFetchOwner(v bool) *ListObjectsV2Input {
s.FetchOwner = &v
return s
} | go | func (s *ListObjectsV2Input) SetFetchOwner(v bool) *ListObjectsV2Input {
s.FetchOwner = &v
return s
} | [
"func",
"(",
"s",
"*",
"ListObjectsV2Input",
")",
"SetFetchOwner",
"(",
"v",
"bool",
")",
"*",
"ListObjectsV2Input",
"{",
"s",
".",
"FetchOwner",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetFetchOwner sets the FetchOwner field's value. | [
"SetFetchOwner",
"sets",
"the",
"FetchOwner",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L16725-L16728 |
165,298 | aws/aws-sdk-go | service/s3/api.go | SetKeyCount | func (s *ListObjectsV2Output) SetKeyCount(v int64) *ListObjectsV2Output {
s.KeyCount = &v
return s
} | go | func (s *ListObjectsV2Output) SetKeyCount(v int64) *ListObjectsV2Output {
s.KeyCount = &v
return s
} | [
"func",
"(",
"s",
"*",
"ListObjectsV2Output",
")",
"SetKeyCount",
"(",
"v",
"int64",
")",
"*",
"ListObjectsV2Output",
"{",
"s",
".",
"KeyCount",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetKeyCount sets the KeyCount field's value. | [
"SetKeyCount",
"sets",
"the",
"KeyCount",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L16852-L16855 |
165,299 | aws/aws-sdk-go | service/s3/api.go | SetNextPartNumberMarker | func (s *ListPartsOutput) SetNextPartNumberMarker(v int64) *ListPartsOutput {
s.NextPartNumberMarker = &v
return s
} | go | func (s *ListPartsOutput) SetNextPartNumberMarker(v int64) *ListPartsOutput {
s.NextPartNumberMarker = &v
return s
} | [
"func",
"(",
"s",
"*",
"ListPartsOutput",
")",
"SetNextPartNumberMarker",
"(",
"v",
"int64",
")",
"*",
"ListPartsOutput",
"{",
"s",
".",
"NextPartNumberMarker",
"=",
"&",
"v",
"\n",
"return",
"s",
"\n",
"}"
] | // SetNextPartNumberMarker sets the NextPartNumberMarker field's value. | [
"SetNextPartNumberMarker",
"sets",
"the",
"NextPartNumberMarker",
"field",
"s",
"value",
"."
] | 6c4060605190fc6f00d63cd4e5572faa9f07345d | https://github.com/aws/aws-sdk-go/blob/6c4060605190fc6f00d63cd4e5572faa9f07345d/service/s3/api.go#L17101-L17104 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.