glide update

This commit is contained in:
James
2017-07-26 12:48:53 -07:00
parent 6ee7619b40
commit 38a2b86184
4048 changed files with 1104059 additions and 554 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,190 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Package devicefarmiface provides an interface for the AWS Device Farm.
package devicefarmiface
import (
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/devicefarm"
)
// DeviceFarmAPI is the interface type for devicefarm.DeviceFarm.
type DeviceFarmAPI interface {
CreateDevicePoolRequest(*devicefarm.CreateDevicePoolInput) (*request.Request, *devicefarm.CreateDevicePoolOutput)
CreateDevicePool(*devicefarm.CreateDevicePoolInput) (*devicefarm.CreateDevicePoolOutput, error)
CreateProjectRequest(*devicefarm.CreateProjectInput) (*request.Request, *devicefarm.CreateProjectOutput)
CreateProject(*devicefarm.CreateProjectInput) (*devicefarm.CreateProjectOutput, error)
CreateUploadRequest(*devicefarm.CreateUploadInput) (*request.Request, *devicefarm.CreateUploadOutput)
CreateUpload(*devicefarm.CreateUploadInput) (*devicefarm.CreateUploadOutput, error)
DeleteDevicePoolRequest(*devicefarm.DeleteDevicePoolInput) (*request.Request, *devicefarm.DeleteDevicePoolOutput)
DeleteDevicePool(*devicefarm.DeleteDevicePoolInput) (*devicefarm.DeleteDevicePoolOutput, error)
DeleteProjectRequest(*devicefarm.DeleteProjectInput) (*request.Request, *devicefarm.DeleteProjectOutput)
DeleteProject(*devicefarm.DeleteProjectInput) (*devicefarm.DeleteProjectOutput, error)
DeleteRunRequest(*devicefarm.DeleteRunInput) (*request.Request, *devicefarm.DeleteRunOutput)
DeleteRun(*devicefarm.DeleteRunInput) (*devicefarm.DeleteRunOutput, error)
DeleteUploadRequest(*devicefarm.DeleteUploadInput) (*request.Request, *devicefarm.DeleteUploadOutput)
DeleteUpload(*devicefarm.DeleteUploadInput) (*devicefarm.DeleteUploadOutput, error)
GetAccountSettingsRequest(*devicefarm.GetAccountSettingsInput) (*request.Request, *devicefarm.GetAccountSettingsOutput)
GetAccountSettings(*devicefarm.GetAccountSettingsInput) (*devicefarm.GetAccountSettingsOutput, error)
GetDeviceRequest(*devicefarm.GetDeviceInput) (*request.Request, *devicefarm.GetDeviceOutput)
GetDevice(*devicefarm.GetDeviceInput) (*devicefarm.GetDeviceOutput, error)
GetDevicePoolRequest(*devicefarm.GetDevicePoolInput) (*request.Request, *devicefarm.GetDevicePoolOutput)
GetDevicePool(*devicefarm.GetDevicePoolInput) (*devicefarm.GetDevicePoolOutput, error)
GetDevicePoolCompatibilityRequest(*devicefarm.GetDevicePoolCompatibilityInput) (*request.Request, *devicefarm.GetDevicePoolCompatibilityOutput)
GetDevicePoolCompatibility(*devicefarm.GetDevicePoolCompatibilityInput) (*devicefarm.GetDevicePoolCompatibilityOutput, error)
GetJobRequest(*devicefarm.GetJobInput) (*request.Request, *devicefarm.GetJobOutput)
GetJob(*devicefarm.GetJobInput) (*devicefarm.GetJobOutput, error)
GetOfferingStatusRequest(*devicefarm.GetOfferingStatusInput) (*request.Request, *devicefarm.GetOfferingStatusOutput)
GetOfferingStatus(*devicefarm.GetOfferingStatusInput) (*devicefarm.GetOfferingStatusOutput, error)
GetOfferingStatusPages(*devicefarm.GetOfferingStatusInput, func(*devicefarm.GetOfferingStatusOutput, bool) bool) error
GetProjectRequest(*devicefarm.GetProjectInput) (*request.Request, *devicefarm.GetProjectOutput)
GetProject(*devicefarm.GetProjectInput) (*devicefarm.GetProjectOutput, error)
GetRunRequest(*devicefarm.GetRunInput) (*request.Request, *devicefarm.GetRunOutput)
GetRun(*devicefarm.GetRunInput) (*devicefarm.GetRunOutput, error)
GetSuiteRequest(*devicefarm.GetSuiteInput) (*request.Request, *devicefarm.GetSuiteOutput)
GetSuite(*devicefarm.GetSuiteInput) (*devicefarm.GetSuiteOutput, error)
GetTestRequest(*devicefarm.GetTestInput) (*request.Request, *devicefarm.GetTestOutput)
GetTest(*devicefarm.GetTestInput) (*devicefarm.GetTestOutput, error)
GetUploadRequest(*devicefarm.GetUploadInput) (*request.Request, *devicefarm.GetUploadOutput)
GetUpload(*devicefarm.GetUploadInput) (*devicefarm.GetUploadOutput, error)
ListArtifactsRequest(*devicefarm.ListArtifactsInput) (*request.Request, *devicefarm.ListArtifactsOutput)
ListArtifacts(*devicefarm.ListArtifactsInput) (*devicefarm.ListArtifactsOutput, error)
ListArtifactsPages(*devicefarm.ListArtifactsInput, func(*devicefarm.ListArtifactsOutput, bool) bool) error
ListDevicePoolsRequest(*devicefarm.ListDevicePoolsInput) (*request.Request, *devicefarm.ListDevicePoolsOutput)
ListDevicePools(*devicefarm.ListDevicePoolsInput) (*devicefarm.ListDevicePoolsOutput, error)
ListDevicePoolsPages(*devicefarm.ListDevicePoolsInput, func(*devicefarm.ListDevicePoolsOutput, bool) bool) error
ListDevicesRequest(*devicefarm.ListDevicesInput) (*request.Request, *devicefarm.ListDevicesOutput)
ListDevices(*devicefarm.ListDevicesInput) (*devicefarm.ListDevicesOutput, error)
ListDevicesPages(*devicefarm.ListDevicesInput, func(*devicefarm.ListDevicesOutput, bool) bool) error
ListJobsRequest(*devicefarm.ListJobsInput) (*request.Request, *devicefarm.ListJobsOutput)
ListJobs(*devicefarm.ListJobsInput) (*devicefarm.ListJobsOutput, error)
ListJobsPages(*devicefarm.ListJobsInput, func(*devicefarm.ListJobsOutput, bool) bool) error
ListOfferingTransactionsRequest(*devicefarm.ListOfferingTransactionsInput) (*request.Request, *devicefarm.ListOfferingTransactionsOutput)
ListOfferingTransactions(*devicefarm.ListOfferingTransactionsInput) (*devicefarm.ListOfferingTransactionsOutput, error)
ListOfferingTransactionsPages(*devicefarm.ListOfferingTransactionsInput, func(*devicefarm.ListOfferingTransactionsOutput, bool) bool) error
ListOfferingsRequest(*devicefarm.ListOfferingsInput) (*request.Request, *devicefarm.ListOfferingsOutput)
ListOfferings(*devicefarm.ListOfferingsInput) (*devicefarm.ListOfferingsOutput, error)
ListOfferingsPages(*devicefarm.ListOfferingsInput, func(*devicefarm.ListOfferingsOutput, bool) bool) error
ListProjectsRequest(*devicefarm.ListProjectsInput) (*request.Request, *devicefarm.ListProjectsOutput)
ListProjects(*devicefarm.ListProjectsInput) (*devicefarm.ListProjectsOutput, error)
ListProjectsPages(*devicefarm.ListProjectsInput, func(*devicefarm.ListProjectsOutput, bool) bool) error
ListRunsRequest(*devicefarm.ListRunsInput) (*request.Request, *devicefarm.ListRunsOutput)
ListRuns(*devicefarm.ListRunsInput) (*devicefarm.ListRunsOutput, error)
ListRunsPages(*devicefarm.ListRunsInput, func(*devicefarm.ListRunsOutput, bool) bool) error
ListSamplesRequest(*devicefarm.ListSamplesInput) (*request.Request, *devicefarm.ListSamplesOutput)
ListSamples(*devicefarm.ListSamplesInput) (*devicefarm.ListSamplesOutput, error)
ListSamplesPages(*devicefarm.ListSamplesInput, func(*devicefarm.ListSamplesOutput, bool) bool) error
ListSuitesRequest(*devicefarm.ListSuitesInput) (*request.Request, *devicefarm.ListSuitesOutput)
ListSuites(*devicefarm.ListSuitesInput) (*devicefarm.ListSuitesOutput, error)
ListSuitesPages(*devicefarm.ListSuitesInput, func(*devicefarm.ListSuitesOutput, bool) bool) error
ListTestsRequest(*devicefarm.ListTestsInput) (*request.Request, *devicefarm.ListTestsOutput)
ListTests(*devicefarm.ListTestsInput) (*devicefarm.ListTestsOutput, error)
ListTestsPages(*devicefarm.ListTestsInput, func(*devicefarm.ListTestsOutput, bool) bool) error
ListUniqueProblemsRequest(*devicefarm.ListUniqueProblemsInput) (*request.Request, *devicefarm.ListUniqueProblemsOutput)
ListUniqueProblems(*devicefarm.ListUniqueProblemsInput) (*devicefarm.ListUniqueProblemsOutput, error)
ListUniqueProblemsPages(*devicefarm.ListUniqueProblemsInput, func(*devicefarm.ListUniqueProblemsOutput, bool) bool) error
ListUploadsRequest(*devicefarm.ListUploadsInput) (*request.Request, *devicefarm.ListUploadsOutput)
ListUploads(*devicefarm.ListUploadsInput) (*devicefarm.ListUploadsOutput, error)
ListUploadsPages(*devicefarm.ListUploadsInput, func(*devicefarm.ListUploadsOutput, bool) bool) error
PurchaseOfferingRequest(*devicefarm.PurchaseOfferingInput) (*request.Request, *devicefarm.PurchaseOfferingOutput)
PurchaseOffering(*devicefarm.PurchaseOfferingInput) (*devicefarm.PurchaseOfferingOutput, error)
RenewOfferingRequest(*devicefarm.RenewOfferingInput) (*request.Request, *devicefarm.RenewOfferingOutput)
RenewOffering(*devicefarm.RenewOfferingInput) (*devicefarm.RenewOfferingOutput, error)
ScheduleRunRequest(*devicefarm.ScheduleRunInput) (*request.Request, *devicefarm.ScheduleRunOutput)
ScheduleRun(*devicefarm.ScheduleRunInput) (*devicefarm.ScheduleRunOutput, error)
StopRunRequest(*devicefarm.StopRunInput) (*request.Request, *devicefarm.StopRunOutput)
StopRun(*devicefarm.StopRunInput) (*devicefarm.StopRunOutput, error)
UpdateDevicePoolRequest(*devicefarm.UpdateDevicePoolInput) (*request.Request, *devicefarm.UpdateDevicePoolOutput)
UpdateDevicePool(*devicefarm.UpdateDevicePoolInput) (*devicefarm.UpdateDevicePoolOutput, error)
UpdateProjectRequest(*devicefarm.UpdateProjectInput) (*request.Request, *devicefarm.UpdateProjectOutput)
UpdateProject(*devicefarm.UpdateProjectInput) (*devicefarm.UpdateProjectOutput, error)
}
var _ DeviceFarmAPI = (*devicefarm.DeviceFarm)(nil)

View File

@@ -0,0 +1,790 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
package devicefarm_test
import (
"bytes"
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/devicefarm"
)
var _ time.Duration
var _ bytes.Buffer
func ExampleDeviceFarm_CreateDevicePool() {
svc := devicefarm.New(session.New())
params := &devicefarm.CreateDevicePoolInput{
Name: aws.String("Name"), // Required
ProjectArn: aws.String("AmazonResourceName"), // Required
Rules: []*devicefarm.Rule{ // Required
{ // Required
Attribute: aws.String("DeviceAttribute"),
Operator: aws.String("RuleOperator"),
Value: aws.String("String"),
},
// More values...
},
Description: aws.String("Message"),
}
resp, err := svc.CreateDevicePool(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_CreateProject() {
svc := devicefarm.New(session.New())
params := &devicefarm.CreateProjectInput{
Name: aws.String("Name"), // Required
}
resp, err := svc.CreateProject(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_CreateUpload() {
svc := devicefarm.New(session.New())
params := &devicefarm.CreateUploadInput{
Name: aws.String("Name"), // Required
ProjectArn: aws.String("AmazonResourceName"), // Required
Type: aws.String("UploadType"), // Required
ContentType: aws.String("ContentType"),
}
resp, err := svc.CreateUpload(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_DeleteDevicePool() {
svc := devicefarm.New(session.New())
params := &devicefarm.DeleteDevicePoolInput{
Arn: aws.String("AmazonResourceName"), // Required
}
resp, err := svc.DeleteDevicePool(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_DeleteProject() {
svc := devicefarm.New(session.New())
params := &devicefarm.DeleteProjectInput{
Arn: aws.String("AmazonResourceName"), // Required
}
resp, err := svc.DeleteProject(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_DeleteRun() {
svc := devicefarm.New(session.New())
params := &devicefarm.DeleteRunInput{
Arn: aws.String("AmazonResourceName"), // Required
}
resp, err := svc.DeleteRun(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_DeleteUpload() {
svc := devicefarm.New(session.New())
params := &devicefarm.DeleteUploadInput{
Arn: aws.String("AmazonResourceName"), // Required
}
resp, err := svc.DeleteUpload(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_GetAccountSettings() {
svc := devicefarm.New(session.New())
var params *devicefarm.GetAccountSettingsInput
resp, err := svc.GetAccountSettings(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_GetDevice() {
svc := devicefarm.New(session.New())
params := &devicefarm.GetDeviceInput{
Arn: aws.String("AmazonResourceName"), // Required
}
resp, err := svc.GetDevice(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_GetDevicePool() {
svc := devicefarm.New(session.New())
params := &devicefarm.GetDevicePoolInput{
Arn: aws.String("AmazonResourceName"), // Required
}
resp, err := svc.GetDevicePool(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_GetDevicePoolCompatibility() {
svc := devicefarm.New(session.New())
params := &devicefarm.GetDevicePoolCompatibilityInput{
DevicePoolArn: aws.String("AmazonResourceName"), // Required
AppArn: aws.String("AmazonResourceName"),
TestType: aws.String("TestType"),
}
resp, err := svc.GetDevicePoolCompatibility(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_GetJob() {
svc := devicefarm.New(session.New())
params := &devicefarm.GetJobInput{
Arn: aws.String("AmazonResourceName"), // Required
}
resp, err := svc.GetJob(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_GetOfferingStatus() {
svc := devicefarm.New(session.New())
params := &devicefarm.GetOfferingStatusInput{
NextToken: aws.String("PaginationToken"),
}
resp, err := svc.GetOfferingStatus(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_GetProject() {
svc := devicefarm.New(session.New())
params := &devicefarm.GetProjectInput{
Arn: aws.String("AmazonResourceName"), // Required
}
resp, err := svc.GetProject(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_GetRun() {
svc := devicefarm.New(session.New())
params := &devicefarm.GetRunInput{
Arn: aws.String("AmazonResourceName"), // Required
}
resp, err := svc.GetRun(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_GetSuite() {
svc := devicefarm.New(session.New())
params := &devicefarm.GetSuiteInput{
Arn: aws.String("AmazonResourceName"), // Required
}
resp, err := svc.GetSuite(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_GetTest() {
svc := devicefarm.New(session.New())
params := &devicefarm.GetTestInput{
Arn: aws.String("AmazonResourceName"), // Required
}
resp, err := svc.GetTest(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_GetUpload() {
svc := devicefarm.New(session.New())
params := &devicefarm.GetUploadInput{
Arn: aws.String("AmazonResourceName"), // Required
}
resp, err := svc.GetUpload(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_ListArtifacts() {
svc := devicefarm.New(session.New())
params := &devicefarm.ListArtifactsInput{
Arn: aws.String("AmazonResourceName"), // Required
Type: aws.String("ArtifactCategory"), // Required
NextToken: aws.String("PaginationToken"),
}
resp, err := svc.ListArtifacts(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_ListDevicePools() {
svc := devicefarm.New(session.New())
params := &devicefarm.ListDevicePoolsInput{
Arn: aws.String("AmazonResourceName"), // Required
NextToken: aws.String("PaginationToken"),
Type: aws.String("DevicePoolType"),
}
resp, err := svc.ListDevicePools(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_ListDevices() {
svc := devicefarm.New(session.New())
params := &devicefarm.ListDevicesInput{
Arn: aws.String("AmazonResourceName"),
NextToken: aws.String("PaginationToken"),
}
resp, err := svc.ListDevices(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_ListJobs() {
svc := devicefarm.New(session.New())
params := &devicefarm.ListJobsInput{
Arn: aws.String("AmazonResourceName"), // Required
NextToken: aws.String("PaginationToken"),
}
resp, err := svc.ListJobs(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_ListOfferingTransactions() {
svc := devicefarm.New(session.New())
params := &devicefarm.ListOfferingTransactionsInput{
NextToken: aws.String("PaginationToken"),
}
resp, err := svc.ListOfferingTransactions(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_ListOfferings() {
svc := devicefarm.New(session.New())
params := &devicefarm.ListOfferingsInput{
NextToken: aws.String("PaginationToken"),
}
resp, err := svc.ListOfferings(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_ListProjects() {
svc := devicefarm.New(session.New())
params := &devicefarm.ListProjectsInput{
Arn: aws.String("AmazonResourceName"),
NextToken: aws.String("PaginationToken"),
}
resp, err := svc.ListProjects(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_ListRuns() {
svc := devicefarm.New(session.New())
params := &devicefarm.ListRunsInput{
Arn: aws.String("AmazonResourceName"), // Required
NextToken: aws.String("PaginationToken"),
}
resp, err := svc.ListRuns(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_ListSamples() {
svc := devicefarm.New(session.New())
params := &devicefarm.ListSamplesInput{
Arn: aws.String("AmazonResourceName"), // Required
NextToken: aws.String("PaginationToken"),
}
resp, err := svc.ListSamples(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_ListSuites() {
svc := devicefarm.New(session.New())
params := &devicefarm.ListSuitesInput{
Arn: aws.String("AmazonResourceName"), // Required
NextToken: aws.String("PaginationToken"),
}
resp, err := svc.ListSuites(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_ListTests() {
svc := devicefarm.New(session.New())
params := &devicefarm.ListTestsInput{
Arn: aws.String("AmazonResourceName"), // Required
NextToken: aws.String("PaginationToken"),
}
resp, err := svc.ListTests(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_ListUniqueProblems() {
svc := devicefarm.New(session.New())
params := &devicefarm.ListUniqueProblemsInput{
Arn: aws.String("AmazonResourceName"), // Required
NextToken: aws.String("PaginationToken"),
}
resp, err := svc.ListUniqueProblems(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_ListUploads() {
svc := devicefarm.New(session.New())
params := &devicefarm.ListUploadsInput{
Arn: aws.String("AmazonResourceName"), // Required
NextToken: aws.String("PaginationToken"),
}
resp, err := svc.ListUploads(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_PurchaseOffering() {
svc := devicefarm.New(session.New())
params := &devicefarm.PurchaseOfferingInput{
OfferingId: aws.String("OfferingIdentifier"),
Quantity: aws.Int64(1),
}
resp, err := svc.PurchaseOffering(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_RenewOffering() {
svc := devicefarm.New(session.New())
params := &devicefarm.RenewOfferingInput{
OfferingId: aws.String("OfferingIdentifier"),
Quantity: aws.Int64(1),
}
resp, err := svc.RenewOffering(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_ScheduleRun() {
svc := devicefarm.New(session.New())
params := &devicefarm.ScheduleRunInput{
DevicePoolArn: aws.String("AmazonResourceName"), // Required
ProjectArn: aws.String("AmazonResourceName"), // Required
Test: &devicefarm.ScheduleRunTest{ // Required
Type: aws.String("TestType"), // Required
Filter: aws.String("Filter"),
Parameters: map[string]*string{
"Key": aws.String("String"), // Required
// More values...
},
TestPackageArn: aws.String("AmazonResourceName"),
},
AppArn: aws.String("AmazonResourceName"),
Configuration: &devicefarm.ScheduleRunConfiguration{
AuxiliaryApps: []*string{
aws.String("AmazonResourceName"), // Required
// More values...
},
BillingMethod: aws.String("BillingMethod"),
ExtraDataPackageArn: aws.String("AmazonResourceName"),
Locale: aws.String("String"),
Location: &devicefarm.Location{
Latitude: aws.Float64(1.0), // Required
Longitude: aws.Float64(1.0), // Required
},
NetworkProfileArn: aws.String("AmazonResourceName"),
Radios: &devicefarm.Radios{
Bluetooth: aws.Bool(true),
Gps: aws.Bool(true),
Nfc: aws.Bool(true),
Wifi: aws.Bool(true),
},
},
Name: aws.String("Name"),
}
resp, err := svc.ScheduleRun(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_StopRun() {
svc := devicefarm.New(session.New())
params := &devicefarm.StopRunInput{
Arn: aws.String("AmazonResourceName"), // Required
}
resp, err := svc.StopRun(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_UpdateDevicePool() {
svc := devicefarm.New(session.New())
params := &devicefarm.UpdateDevicePoolInput{
Arn: aws.String("AmazonResourceName"), // Required
Description: aws.String("Message"),
Name: aws.String("Name"),
Rules: []*devicefarm.Rule{
{ // Required
Attribute: aws.String("DeviceAttribute"),
Operator: aws.String("RuleOperator"),
Value: aws.String("String"),
},
// More values...
},
}
resp, err := svc.UpdateDevicePool(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleDeviceFarm_UpdateProject() {
svc := devicefarm.New(session.New())
params := &devicefarm.UpdateProjectInput{
Arn: aws.String("AmazonResourceName"), // Required
Name: aws.String("Name"),
}
resp, err := svc.UpdateProject(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}

View File

@@ -0,0 +1,90 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
package devicefarm
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/client/metadata"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/signer/v4"
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
// AWS Device Farm is a service that enables mobile app developers to test Android,
// iOS, and Fire OS apps on physical phones, tablets, and other devices in the
// cloud.
//The service client's operations are safe to be used concurrently.
// It is not safe to mutate any of the client's properties though.
type DeviceFarm struct {
*client.Client
}
// Used for custom client initialization logic
var initClient func(*client.Client)
// Used for custom request initialization logic
var initRequest func(*request.Request)
// A ServiceName is the name of the service the client will make API calls to.
const ServiceName = "devicefarm"
// New creates a new instance of the DeviceFarm client with a session.
// If additional configuration is needed for the client instance use the optional
// aws.Config parameter to add your extra config.
//
// Example:
// // Create a DeviceFarm client from just a session.
// svc := devicefarm.New(mySession)
//
// // Create a DeviceFarm client with additional configuration
// svc := devicefarm.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *DeviceFarm {
c := p.ClientConfig(ServiceName, cfgs...)
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *DeviceFarm {
svc := &DeviceFarm{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2015-06-23",
JSONVersion: "1.1",
TargetPrefix: "DeviceFarm_20150623",
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a DeviceFarm operation and runs any
// custom request initialization.
func (c *DeviceFarm) newRequest(op *request.Operation, params, data interface{}) *request.Request {
req := c.NewRequest(op, params, data)
// Run custom request initialization if present
if initRequest != nil {
initRequest(req)
}
return req
}