github.com/aavshr/aws-sdk-go@v1.41.3/service/augmentedairuntime/api.go (about)

     1  // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
     2  
     3  package augmentedairuntime
     4  
     5  import (
     6  	"fmt"
     7  	"time"
     8  
     9  	"github.com/aavshr/aws-sdk-go/aws"
    10  	"github.com/aavshr/aws-sdk-go/aws/awsutil"
    11  	"github.com/aavshr/aws-sdk-go/aws/request"
    12  	"github.com/aavshr/aws-sdk-go/private/protocol"
    13  	"github.com/aavshr/aws-sdk-go/private/protocol/restjson"
    14  )
    15  
    16  const opDeleteHumanLoop = "DeleteHumanLoop"
    17  
    18  // DeleteHumanLoopRequest generates a "aws/request.Request" representing the
    19  // client's request for the DeleteHumanLoop operation. The "output" return
    20  // value will be populated with the request's response once the request completes
    21  // successfully.
    22  //
    23  // Use "Send" method on the returned Request to send the API call to the service.
    24  // the "output" return value is not valid until after Send returns without error.
    25  //
    26  // See DeleteHumanLoop for more information on using the DeleteHumanLoop
    27  // API call, and error handling.
    28  //
    29  // This method is useful when you want to inject custom logic or configuration
    30  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
    31  //
    32  //
    33  //    // Example sending a request using the DeleteHumanLoopRequest method.
    34  //    req, resp := client.DeleteHumanLoopRequest(params)
    35  //
    36  //    err := req.Send()
    37  //    if err == nil { // resp is now filled
    38  //        fmt.Println(resp)
    39  //    }
    40  //
    41  // See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-a2i-runtime-2019-11-07/DeleteHumanLoop
    42  func (c *AugmentedAIRuntime) DeleteHumanLoopRequest(input *DeleteHumanLoopInput) (req *request.Request, output *DeleteHumanLoopOutput) {
    43  	op := &request.Operation{
    44  		Name:       opDeleteHumanLoop,
    45  		HTTPMethod: "DELETE",
    46  		HTTPPath:   "/human-loops/{HumanLoopName}",
    47  	}
    48  
    49  	if input == nil {
    50  		input = &DeleteHumanLoopInput{}
    51  	}
    52  
    53  	output = &DeleteHumanLoopOutput{}
    54  	req = c.newRequest(op, input, output)
    55  	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
    56  	return
    57  }
    58  
    59  // DeleteHumanLoop API operation for Amazon Augmented AI Runtime.
    60  //
    61  // Deletes the specified human loop for a flow definition.
    62  //
    63  // If the human loop was deleted, this operation will return a ResourceNotFoundException.
    64  //
    65  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
    66  // with awserr.Error's Code and Message methods to get detailed information about
    67  // the error.
    68  //
    69  // See the AWS API reference guide for Amazon Augmented AI Runtime's
    70  // API operation DeleteHumanLoop for usage and error information.
    71  //
    72  // Returned Error Types:
    73  //   * ValidationException
    74  //   The request isn't valid. Check the syntax and try again.
    75  //
    76  //   * ResourceNotFoundException
    77  //   We couldn't find the requested resource. Check that your resources exists
    78  //   and were created in the same AWS Region as your request, and try your request
    79  //   again.
    80  //
    81  //   * ThrottlingException
    82  //   You exceeded the maximum number of requests.
    83  //
    84  //   * InternalServerException
    85  //   We couldn't process your request because of an issue with the server. Try
    86  //   again later.
    87  //
    88  // See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-a2i-runtime-2019-11-07/DeleteHumanLoop
    89  func (c *AugmentedAIRuntime) DeleteHumanLoop(input *DeleteHumanLoopInput) (*DeleteHumanLoopOutput, error) {
    90  	req, out := c.DeleteHumanLoopRequest(input)
    91  	return out, req.Send()
    92  }
    93  
    94  // DeleteHumanLoopWithContext is the same as DeleteHumanLoop with the addition of
    95  // the ability to pass a context and additional request options.
    96  //
    97  // See DeleteHumanLoop for details on how to use this API operation.
    98  //
    99  // The context must be non-nil and will be used for request cancellation. If
   100  // the context is nil a panic will occur. In the future the SDK may create
   101  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   102  // for more information on using Contexts.
   103  func (c *AugmentedAIRuntime) DeleteHumanLoopWithContext(ctx aws.Context, input *DeleteHumanLoopInput, opts ...request.Option) (*DeleteHumanLoopOutput, error) {
   104  	req, out := c.DeleteHumanLoopRequest(input)
   105  	req.SetContext(ctx)
   106  	req.ApplyOptions(opts...)
   107  	return out, req.Send()
   108  }
   109  
   110  const opDescribeHumanLoop = "DescribeHumanLoop"
   111  
   112  // DescribeHumanLoopRequest generates a "aws/request.Request" representing the
   113  // client's request for the DescribeHumanLoop operation. The "output" return
   114  // value will be populated with the request's response once the request completes
   115  // successfully.
   116  //
   117  // Use "Send" method on the returned Request to send the API call to the service.
   118  // the "output" return value is not valid until after Send returns without error.
   119  //
   120  // See DescribeHumanLoop for more information on using the DescribeHumanLoop
   121  // API call, and error handling.
   122  //
   123  // This method is useful when you want to inject custom logic or configuration
   124  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   125  //
   126  //
   127  //    // Example sending a request using the DescribeHumanLoopRequest method.
   128  //    req, resp := client.DescribeHumanLoopRequest(params)
   129  //
   130  //    err := req.Send()
   131  //    if err == nil { // resp is now filled
   132  //        fmt.Println(resp)
   133  //    }
   134  //
   135  // See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-a2i-runtime-2019-11-07/DescribeHumanLoop
   136  func (c *AugmentedAIRuntime) DescribeHumanLoopRequest(input *DescribeHumanLoopInput) (req *request.Request, output *DescribeHumanLoopOutput) {
   137  	op := &request.Operation{
   138  		Name:       opDescribeHumanLoop,
   139  		HTTPMethod: "GET",
   140  		HTTPPath:   "/human-loops/{HumanLoopName}",
   141  	}
   142  
   143  	if input == nil {
   144  		input = &DescribeHumanLoopInput{}
   145  	}
   146  
   147  	output = &DescribeHumanLoopOutput{}
   148  	req = c.newRequest(op, input, output)
   149  	return
   150  }
   151  
   152  // DescribeHumanLoop API operation for Amazon Augmented AI Runtime.
   153  //
   154  // Returns information about the specified human loop. If the human loop was
   155  // deleted, this operation will return a ResourceNotFoundException error.
   156  //
   157  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   158  // with awserr.Error's Code and Message methods to get detailed information about
   159  // the error.
   160  //
   161  // See the AWS API reference guide for Amazon Augmented AI Runtime's
   162  // API operation DescribeHumanLoop for usage and error information.
   163  //
   164  // Returned Error Types:
   165  //   * ValidationException
   166  //   The request isn't valid. Check the syntax and try again.
   167  //
   168  //   * ResourceNotFoundException
   169  //   We couldn't find the requested resource. Check that your resources exists
   170  //   and were created in the same AWS Region as your request, and try your request
   171  //   again.
   172  //
   173  //   * ThrottlingException
   174  //   You exceeded the maximum number of requests.
   175  //
   176  //   * InternalServerException
   177  //   We couldn't process your request because of an issue with the server. Try
   178  //   again later.
   179  //
   180  // See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-a2i-runtime-2019-11-07/DescribeHumanLoop
   181  func (c *AugmentedAIRuntime) DescribeHumanLoop(input *DescribeHumanLoopInput) (*DescribeHumanLoopOutput, error) {
   182  	req, out := c.DescribeHumanLoopRequest(input)
   183  	return out, req.Send()
   184  }
   185  
   186  // DescribeHumanLoopWithContext is the same as DescribeHumanLoop with the addition of
   187  // the ability to pass a context and additional request options.
   188  //
   189  // See DescribeHumanLoop for details on how to use this API operation.
   190  //
   191  // The context must be non-nil and will be used for request cancellation. If
   192  // the context is nil a panic will occur. In the future the SDK may create
   193  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   194  // for more information on using Contexts.
   195  func (c *AugmentedAIRuntime) DescribeHumanLoopWithContext(ctx aws.Context, input *DescribeHumanLoopInput, opts ...request.Option) (*DescribeHumanLoopOutput, error) {
   196  	req, out := c.DescribeHumanLoopRequest(input)
   197  	req.SetContext(ctx)
   198  	req.ApplyOptions(opts...)
   199  	return out, req.Send()
   200  }
   201  
   202  const opListHumanLoops = "ListHumanLoops"
   203  
   204  // ListHumanLoopsRequest generates a "aws/request.Request" representing the
   205  // client's request for the ListHumanLoops operation. The "output" return
   206  // value will be populated with the request's response once the request completes
   207  // successfully.
   208  //
   209  // Use "Send" method on the returned Request to send the API call to the service.
   210  // the "output" return value is not valid until after Send returns without error.
   211  //
   212  // See ListHumanLoops for more information on using the ListHumanLoops
   213  // API call, and error handling.
   214  //
   215  // This method is useful when you want to inject custom logic or configuration
   216  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   217  //
   218  //
   219  //    // Example sending a request using the ListHumanLoopsRequest method.
   220  //    req, resp := client.ListHumanLoopsRequest(params)
   221  //
   222  //    err := req.Send()
   223  //    if err == nil { // resp is now filled
   224  //        fmt.Println(resp)
   225  //    }
   226  //
   227  // See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-a2i-runtime-2019-11-07/ListHumanLoops
   228  func (c *AugmentedAIRuntime) ListHumanLoopsRequest(input *ListHumanLoopsInput) (req *request.Request, output *ListHumanLoopsOutput) {
   229  	op := &request.Operation{
   230  		Name:       opListHumanLoops,
   231  		HTTPMethod: "GET",
   232  		HTTPPath:   "/human-loops",
   233  		Paginator: &request.Paginator{
   234  			InputTokens:     []string{"NextToken"},
   235  			OutputTokens:    []string{"NextToken"},
   236  			LimitToken:      "MaxResults",
   237  			TruncationToken: "",
   238  		},
   239  	}
   240  
   241  	if input == nil {
   242  		input = &ListHumanLoopsInput{}
   243  	}
   244  
   245  	output = &ListHumanLoopsOutput{}
   246  	req = c.newRequest(op, input, output)
   247  	return
   248  }
   249  
   250  // ListHumanLoops API operation for Amazon Augmented AI Runtime.
   251  //
   252  // Returns information about human loops, given the specified parameters. If
   253  // a human loop was deleted, it will not be included.
   254  //
   255  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   256  // with awserr.Error's Code and Message methods to get detailed information about
   257  // the error.
   258  //
   259  // See the AWS API reference guide for Amazon Augmented AI Runtime's
   260  // API operation ListHumanLoops for usage and error information.
   261  //
   262  // Returned Error Types:
   263  //   * ValidationException
   264  //   The request isn't valid. Check the syntax and try again.
   265  //
   266  //   * ResourceNotFoundException
   267  //   We couldn't find the requested resource. Check that your resources exists
   268  //   and were created in the same AWS Region as your request, and try your request
   269  //   again.
   270  //
   271  //   * ThrottlingException
   272  //   You exceeded the maximum number of requests.
   273  //
   274  //   * InternalServerException
   275  //   We couldn't process your request because of an issue with the server. Try
   276  //   again later.
   277  //
   278  // See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-a2i-runtime-2019-11-07/ListHumanLoops
   279  func (c *AugmentedAIRuntime) ListHumanLoops(input *ListHumanLoopsInput) (*ListHumanLoopsOutput, error) {
   280  	req, out := c.ListHumanLoopsRequest(input)
   281  	return out, req.Send()
   282  }
   283  
   284  // ListHumanLoopsWithContext is the same as ListHumanLoops with the addition of
   285  // the ability to pass a context and additional request options.
   286  //
   287  // See ListHumanLoops for details on how to use this API operation.
   288  //
   289  // The context must be non-nil and will be used for request cancellation. If
   290  // the context is nil a panic will occur. In the future the SDK may create
   291  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   292  // for more information on using Contexts.
   293  func (c *AugmentedAIRuntime) ListHumanLoopsWithContext(ctx aws.Context, input *ListHumanLoopsInput, opts ...request.Option) (*ListHumanLoopsOutput, error) {
   294  	req, out := c.ListHumanLoopsRequest(input)
   295  	req.SetContext(ctx)
   296  	req.ApplyOptions(opts...)
   297  	return out, req.Send()
   298  }
   299  
   300  // ListHumanLoopsPages iterates over the pages of a ListHumanLoops operation,
   301  // calling the "fn" function with the response data for each page. To stop
   302  // iterating, return false from the fn function.
   303  //
   304  // See ListHumanLoops method for more information on how to use this operation.
   305  //
   306  // Note: This operation can generate multiple requests to a service.
   307  //
   308  //    // Example iterating over at most 3 pages of a ListHumanLoops operation.
   309  //    pageNum := 0
   310  //    err := client.ListHumanLoopsPages(params,
   311  //        func(page *augmentedairuntime.ListHumanLoopsOutput, lastPage bool) bool {
   312  //            pageNum++
   313  //            fmt.Println(page)
   314  //            return pageNum <= 3
   315  //        })
   316  //
   317  func (c *AugmentedAIRuntime) ListHumanLoopsPages(input *ListHumanLoopsInput, fn func(*ListHumanLoopsOutput, bool) bool) error {
   318  	return c.ListHumanLoopsPagesWithContext(aws.BackgroundContext(), input, fn)
   319  }
   320  
   321  // ListHumanLoopsPagesWithContext same as ListHumanLoopsPages except
   322  // it takes a Context and allows setting request options on the pages.
   323  //
   324  // The context must be non-nil and will be used for request cancellation. If
   325  // the context is nil a panic will occur. In the future the SDK may create
   326  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   327  // for more information on using Contexts.
   328  func (c *AugmentedAIRuntime) ListHumanLoopsPagesWithContext(ctx aws.Context, input *ListHumanLoopsInput, fn func(*ListHumanLoopsOutput, bool) bool, opts ...request.Option) error {
   329  	p := request.Pagination{
   330  		NewRequest: func() (*request.Request, error) {
   331  			var inCpy *ListHumanLoopsInput
   332  			if input != nil {
   333  				tmp := *input
   334  				inCpy = &tmp
   335  			}
   336  			req, _ := c.ListHumanLoopsRequest(inCpy)
   337  			req.SetContext(ctx)
   338  			req.ApplyOptions(opts...)
   339  			return req, nil
   340  		},
   341  	}
   342  
   343  	for p.Next() {
   344  		if !fn(p.Page().(*ListHumanLoopsOutput), !p.HasNextPage()) {
   345  			break
   346  		}
   347  	}
   348  
   349  	return p.Err()
   350  }
   351  
   352  const opStartHumanLoop = "StartHumanLoop"
   353  
   354  // StartHumanLoopRequest generates a "aws/request.Request" representing the
   355  // client's request for the StartHumanLoop operation. The "output" return
   356  // value will be populated with the request's response once the request completes
   357  // successfully.
   358  //
   359  // Use "Send" method on the returned Request to send the API call to the service.
   360  // the "output" return value is not valid until after Send returns without error.
   361  //
   362  // See StartHumanLoop for more information on using the StartHumanLoop
   363  // API call, and error handling.
   364  //
   365  // This method is useful when you want to inject custom logic or configuration
   366  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   367  //
   368  //
   369  //    // Example sending a request using the StartHumanLoopRequest method.
   370  //    req, resp := client.StartHumanLoopRequest(params)
   371  //
   372  //    err := req.Send()
   373  //    if err == nil { // resp is now filled
   374  //        fmt.Println(resp)
   375  //    }
   376  //
   377  // See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-a2i-runtime-2019-11-07/StartHumanLoop
   378  func (c *AugmentedAIRuntime) StartHumanLoopRequest(input *StartHumanLoopInput) (req *request.Request, output *StartHumanLoopOutput) {
   379  	op := &request.Operation{
   380  		Name:       opStartHumanLoop,
   381  		HTTPMethod: "POST",
   382  		HTTPPath:   "/human-loops",
   383  	}
   384  
   385  	if input == nil {
   386  		input = &StartHumanLoopInput{}
   387  	}
   388  
   389  	output = &StartHumanLoopOutput{}
   390  	req = c.newRequest(op, input, output)
   391  	return
   392  }
   393  
   394  // StartHumanLoop API operation for Amazon Augmented AI Runtime.
   395  //
   396  // Starts a human loop, provided that at least one activation condition is met.
   397  //
   398  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   399  // with awserr.Error's Code and Message methods to get detailed information about
   400  // the error.
   401  //
   402  // See the AWS API reference guide for Amazon Augmented AI Runtime's
   403  // API operation StartHumanLoop for usage and error information.
   404  //
   405  // Returned Error Types:
   406  //   * ValidationException
   407  //   The request isn't valid. Check the syntax and try again.
   408  //
   409  //   * ThrottlingException
   410  //   You exceeded the maximum number of requests.
   411  //
   412  //   * ServiceQuotaExceededException
   413  //   You exceeded your service quota. Service quotas, also referred to as limits,
   414  //   are the maximum number of service resources or operations for your AWS account.
   415  //   For a list of Amazon A2I service quotes, see Amazon Augmented AI Service
   416  //   Quotes (https://docs.aws.amazon.com/general/latest/gr/a2i.html). Delete some
   417  //   resources or request an increase in your service quota. You can request a
   418  //   quota increase using Service Quotas or the AWS Support Center. To request
   419  //   an increase, see AWS Service Quotas (https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html)
   420  //   in the AWS General Reference.
   421  //
   422  //   * InternalServerException
   423  //   We couldn't process your request because of an issue with the server. Try
   424  //   again later.
   425  //
   426  //   * ConflictException
   427  //   Your request has the same name as another active human loop but has different
   428  //   input data. You cannot start two human loops with the same name and different
   429  //   input data.
   430  //
   431  // See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-a2i-runtime-2019-11-07/StartHumanLoop
   432  func (c *AugmentedAIRuntime) StartHumanLoop(input *StartHumanLoopInput) (*StartHumanLoopOutput, error) {
   433  	req, out := c.StartHumanLoopRequest(input)
   434  	return out, req.Send()
   435  }
   436  
   437  // StartHumanLoopWithContext is the same as StartHumanLoop with the addition of
   438  // the ability to pass a context and additional request options.
   439  //
   440  // See StartHumanLoop for details on how to use this API operation.
   441  //
   442  // The context must be non-nil and will be used for request cancellation. If
   443  // the context is nil a panic will occur. In the future the SDK may create
   444  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   445  // for more information on using Contexts.
   446  func (c *AugmentedAIRuntime) StartHumanLoopWithContext(ctx aws.Context, input *StartHumanLoopInput, opts ...request.Option) (*StartHumanLoopOutput, error) {
   447  	req, out := c.StartHumanLoopRequest(input)
   448  	req.SetContext(ctx)
   449  	req.ApplyOptions(opts...)
   450  	return out, req.Send()
   451  }
   452  
   453  const opStopHumanLoop = "StopHumanLoop"
   454  
   455  // StopHumanLoopRequest generates a "aws/request.Request" representing the
   456  // client's request for the StopHumanLoop operation. The "output" return
   457  // value will be populated with the request's response once the request completes
   458  // successfully.
   459  //
   460  // Use "Send" method on the returned Request to send the API call to the service.
   461  // the "output" return value is not valid until after Send returns without error.
   462  //
   463  // See StopHumanLoop for more information on using the StopHumanLoop
   464  // API call, and error handling.
   465  //
   466  // This method is useful when you want to inject custom logic or configuration
   467  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   468  //
   469  //
   470  //    // Example sending a request using the StopHumanLoopRequest method.
   471  //    req, resp := client.StopHumanLoopRequest(params)
   472  //
   473  //    err := req.Send()
   474  //    if err == nil { // resp is now filled
   475  //        fmt.Println(resp)
   476  //    }
   477  //
   478  // See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-a2i-runtime-2019-11-07/StopHumanLoop
   479  func (c *AugmentedAIRuntime) StopHumanLoopRequest(input *StopHumanLoopInput) (req *request.Request, output *StopHumanLoopOutput) {
   480  	op := &request.Operation{
   481  		Name:       opStopHumanLoop,
   482  		HTTPMethod: "POST",
   483  		HTTPPath:   "/human-loops/stop",
   484  	}
   485  
   486  	if input == nil {
   487  		input = &StopHumanLoopInput{}
   488  	}
   489  
   490  	output = &StopHumanLoopOutput{}
   491  	req = c.newRequest(op, input, output)
   492  	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
   493  	return
   494  }
   495  
   496  // StopHumanLoop API operation for Amazon Augmented AI Runtime.
   497  //
   498  // Stops the specified human loop.
   499  //
   500  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   501  // with awserr.Error's Code and Message methods to get detailed information about
   502  // the error.
   503  //
   504  // See the AWS API reference guide for Amazon Augmented AI Runtime's
   505  // API operation StopHumanLoop for usage and error information.
   506  //
   507  // Returned Error Types:
   508  //   * ValidationException
   509  //   The request isn't valid. Check the syntax and try again.
   510  //
   511  //   * ResourceNotFoundException
   512  //   We couldn't find the requested resource. Check that your resources exists
   513  //   and were created in the same AWS Region as your request, and try your request
   514  //   again.
   515  //
   516  //   * ThrottlingException
   517  //   You exceeded the maximum number of requests.
   518  //
   519  //   * InternalServerException
   520  //   We couldn't process your request because of an issue with the server. Try
   521  //   again later.
   522  //
   523  // See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-a2i-runtime-2019-11-07/StopHumanLoop
   524  func (c *AugmentedAIRuntime) StopHumanLoop(input *StopHumanLoopInput) (*StopHumanLoopOutput, error) {
   525  	req, out := c.StopHumanLoopRequest(input)
   526  	return out, req.Send()
   527  }
   528  
   529  // StopHumanLoopWithContext is the same as StopHumanLoop with the addition of
   530  // the ability to pass a context and additional request options.
   531  //
   532  // See StopHumanLoop for details on how to use this API operation.
   533  //
   534  // The context must be non-nil and will be used for request cancellation. If
   535  // the context is nil a panic will occur. In the future the SDK may create
   536  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   537  // for more information on using Contexts.
   538  func (c *AugmentedAIRuntime) StopHumanLoopWithContext(ctx aws.Context, input *StopHumanLoopInput, opts ...request.Option) (*StopHumanLoopOutput, error) {
   539  	req, out := c.StopHumanLoopRequest(input)
   540  	req.SetContext(ctx)
   541  	req.ApplyOptions(opts...)
   542  	return out, req.Send()
   543  }
   544  
   545  // Your request has the same name as another active human loop but has different
   546  // input data. You cannot start two human loops with the same name and different
   547  // input data.
   548  type ConflictException struct {
   549  	_            struct{}                  `type:"structure"`
   550  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
   551  
   552  	Message_ *string `locationName:"Message" type:"string"`
   553  }
   554  
   555  // String returns the string representation.
   556  //
   557  // API parameter values that are decorated as "sensitive" in the API will not
   558  // be included in the string output. The member name will be present, but the
   559  // value will be replaced with "sensitive".
   560  func (s ConflictException) String() string {
   561  	return awsutil.Prettify(s)
   562  }
   563  
   564  // GoString returns the string representation.
   565  //
   566  // API parameter values that are decorated as "sensitive" in the API will not
   567  // be included in the string output. The member name will be present, but the
   568  // value will be replaced with "sensitive".
   569  func (s ConflictException) GoString() string {
   570  	return s.String()
   571  }
   572  
   573  func newErrorConflictException(v protocol.ResponseMetadata) error {
   574  	return &ConflictException{
   575  		RespMetadata: v,
   576  	}
   577  }
   578  
   579  // Code returns the exception type name.
   580  func (s *ConflictException) Code() string {
   581  	return "ConflictException"
   582  }
   583  
   584  // Message returns the exception's message.
   585  func (s *ConflictException) Message() string {
   586  	if s.Message_ != nil {
   587  		return *s.Message_
   588  	}
   589  	return ""
   590  }
   591  
   592  // OrigErr always returns nil, satisfies awserr.Error interface.
   593  func (s *ConflictException) OrigErr() error {
   594  	return nil
   595  }
   596  
   597  func (s *ConflictException) Error() string {
   598  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
   599  }
   600  
   601  // Status code returns the HTTP status code for the request's response error.
   602  func (s *ConflictException) StatusCode() int {
   603  	return s.RespMetadata.StatusCode
   604  }
   605  
   606  // RequestID returns the service's response RequestID for request.
   607  func (s *ConflictException) RequestID() string {
   608  	return s.RespMetadata.RequestID
   609  }
   610  
   611  type DeleteHumanLoopInput struct {
   612  	_ struct{} `type:"structure" nopayload:"true"`
   613  
   614  	// The name of the human loop that you want to delete.
   615  	//
   616  	// HumanLoopName is a required field
   617  	HumanLoopName *string `location:"uri" locationName:"HumanLoopName" min:"1" type:"string" required:"true"`
   618  }
   619  
   620  // String returns the string representation.
   621  //
   622  // API parameter values that are decorated as "sensitive" in the API will not
   623  // be included in the string output. The member name will be present, but the
   624  // value will be replaced with "sensitive".
   625  func (s DeleteHumanLoopInput) String() string {
   626  	return awsutil.Prettify(s)
   627  }
   628  
   629  // GoString returns the string representation.
   630  //
   631  // API parameter values that are decorated as "sensitive" in the API will not
   632  // be included in the string output. The member name will be present, but the
   633  // value will be replaced with "sensitive".
   634  func (s DeleteHumanLoopInput) GoString() string {
   635  	return s.String()
   636  }
   637  
   638  // Validate inspects the fields of the type to determine if they are valid.
   639  func (s *DeleteHumanLoopInput) Validate() error {
   640  	invalidParams := request.ErrInvalidParams{Context: "DeleteHumanLoopInput"}
   641  	if s.HumanLoopName == nil {
   642  		invalidParams.Add(request.NewErrParamRequired("HumanLoopName"))
   643  	}
   644  	if s.HumanLoopName != nil && len(*s.HumanLoopName) < 1 {
   645  		invalidParams.Add(request.NewErrParamMinLen("HumanLoopName", 1))
   646  	}
   647  
   648  	if invalidParams.Len() > 0 {
   649  		return invalidParams
   650  	}
   651  	return nil
   652  }
   653  
   654  // SetHumanLoopName sets the HumanLoopName field's value.
   655  func (s *DeleteHumanLoopInput) SetHumanLoopName(v string) *DeleteHumanLoopInput {
   656  	s.HumanLoopName = &v
   657  	return s
   658  }
   659  
   660  type DeleteHumanLoopOutput struct {
   661  	_ struct{} `type:"structure" nopayload:"true"`
   662  }
   663  
   664  // String returns the string representation.
   665  //
   666  // API parameter values that are decorated as "sensitive" in the API will not
   667  // be included in the string output. The member name will be present, but the
   668  // value will be replaced with "sensitive".
   669  func (s DeleteHumanLoopOutput) String() string {
   670  	return awsutil.Prettify(s)
   671  }
   672  
   673  // GoString returns the string representation.
   674  //
   675  // API parameter values that are decorated as "sensitive" in the API will not
   676  // be included in the string output. The member name will be present, but the
   677  // value will be replaced with "sensitive".
   678  func (s DeleteHumanLoopOutput) GoString() string {
   679  	return s.String()
   680  }
   681  
   682  type DescribeHumanLoopInput struct {
   683  	_ struct{} `type:"structure" nopayload:"true"`
   684  
   685  	// The name of the human loop that you want information about.
   686  	//
   687  	// HumanLoopName is a required field
   688  	HumanLoopName *string `location:"uri" locationName:"HumanLoopName" min:"1" type:"string" required:"true"`
   689  }
   690  
   691  // String returns the string representation.
   692  //
   693  // API parameter values that are decorated as "sensitive" in the API will not
   694  // be included in the string output. The member name will be present, but the
   695  // value will be replaced with "sensitive".
   696  func (s DescribeHumanLoopInput) String() string {
   697  	return awsutil.Prettify(s)
   698  }
   699  
   700  // GoString returns the string representation.
   701  //
   702  // API parameter values that are decorated as "sensitive" in the API will not
   703  // be included in the string output. The member name will be present, but the
   704  // value will be replaced with "sensitive".
   705  func (s DescribeHumanLoopInput) GoString() string {
   706  	return s.String()
   707  }
   708  
   709  // Validate inspects the fields of the type to determine if they are valid.
   710  func (s *DescribeHumanLoopInput) Validate() error {
   711  	invalidParams := request.ErrInvalidParams{Context: "DescribeHumanLoopInput"}
   712  	if s.HumanLoopName == nil {
   713  		invalidParams.Add(request.NewErrParamRequired("HumanLoopName"))
   714  	}
   715  	if s.HumanLoopName != nil && len(*s.HumanLoopName) < 1 {
   716  		invalidParams.Add(request.NewErrParamMinLen("HumanLoopName", 1))
   717  	}
   718  
   719  	if invalidParams.Len() > 0 {
   720  		return invalidParams
   721  	}
   722  	return nil
   723  }
   724  
   725  // SetHumanLoopName sets the HumanLoopName field's value.
   726  func (s *DescribeHumanLoopInput) SetHumanLoopName(v string) *DescribeHumanLoopInput {
   727  	s.HumanLoopName = &v
   728  	return s
   729  }
   730  
   731  type DescribeHumanLoopOutput struct {
   732  	_ struct{} `type:"structure"`
   733  
   734  	// The creation time when Amazon Augmented AI created the human loop.
   735  	//
   736  	// CreationTime is a required field
   737  	CreationTime *time.Time `type:"timestamp" required:"true"`
   738  
   739  	// A failure code that identifies the type of failure.
   740  	//
   741  	// Possible values: ValidationError, Expired, InternalError
   742  	FailureCode *string `type:"string"`
   743  
   744  	// The reason why a human loop failed. The failure reason is returned when the
   745  	// status of the human loop is Failed.
   746  	FailureReason *string `type:"string"`
   747  
   748  	// The Amazon Resource Name (ARN) of the flow definition.
   749  	//
   750  	// FlowDefinitionArn is a required field
   751  	FlowDefinitionArn *string `type:"string" required:"true"`
   752  
   753  	// The Amazon Resource Name (ARN) of the human loop.
   754  	//
   755  	// HumanLoopArn is a required field
   756  	HumanLoopArn *string `type:"string" required:"true"`
   757  
   758  	// The name of the human loop. The name must be lowercase, unique within the
   759  	// Region in your account, and can have up to 63 characters. Valid characters:
   760  	// a-z, 0-9, and - (hyphen).
   761  	//
   762  	// HumanLoopName is a required field
   763  	HumanLoopName *string `min:"1" type:"string" required:"true"`
   764  
   765  	// An object that contains information about the output of the human loop.
   766  	HumanLoopOutput *HumanLoopOutput `type:"structure"`
   767  
   768  	// The status of the human loop.
   769  	//
   770  	// HumanLoopStatus is a required field
   771  	HumanLoopStatus *string `type:"string" required:"true" enum:"HumanLoopStatus"`
   772  }
   773  
   774  // String returns the string representation.
   775  //
   776  // API parameter values that are decorated as "sensitive" in the API will not
   777  // be included in the string output. The member name will be present, but the
   778  // value will be replaced with "sensitive".
   779  func (s DescribeHumanLoopOutput) String() string {
   780  	return awsutil.Prettify(s)
   781  }
   782  
   783  // GoString returns the string representation.
   784  //
   785  // API parameter values that are decorated as "sensitive" in the API will not
   786  // be included in the string output. The member name will be present, but the
   787  // value will be replaced with "sensitive".
   788  func (s DescribeHumanLoopOutput) GoString() string {
   789  	return s.String()
   790  }
   791  
   792  // SetCreationTime sets the CreationTime field's value.
   793  func (s *DescribeHumanLoopOutput) SetCreationTime(v time.Time) *DescribeHumanLoopOutput {
   794  	s.CreationTime = &v
   795  	return s
   796  }
   797  
   798  // SetFailureCode sets the FailureCode field's value.
   799  func (s *DescribeHumanLoopOutput) SetFailureCode(v string) *DescribeHumanLoopOutput {
   800  	s.FailureCode = &v
   801  	return s
   802  }
   803  
   804  // SetFailureReason sets the FailureReason field's value.
   805  func (s *DescribeHumanLoopOutput) SetFailureReason(v string) *DescribeHumanLoopOutput {
   806  	s.FailureReason = &v
   807  	return s
   808  }
   809  
   810  // SetFlowDefinitionArn sets the FlowDefinitionArn field's value.
   811  func (s *DescribeHumanLoopOutput) SetFlowDefinitionArn(v string) *DescribeHumanLoopOutput {
   812  	s.FlowDefinitionArn = &v
   813  	return s
   814  }
   815  
   816  // SetHumanLoopArn sets the HumanLoopArn field's value.
   817  func (s *DescribeHumanLoopOutput) SetHumanLoopArn(v string) *DescribeHumanLoopOutput {
   818  	s.HumanLoopArn = &v
   819  	return s
   820  }
   821  
   822  // SetHumanLoopName sets the HumanLoopName field's value.
   823  func (s *DescribeHumanLoopOutput) SetHumanLoopName(v string) *DescribeHumanLoopOutput {
   824  	s.HumanLoopName = &v
   825  	return s
   826  }
   827  
   828  // SetHumanLoopOutput sets the HumanLoopOutput field's value.
   829  func (s *DescribeHumanLoopOutput) SetHumanLoopOutput(v *HumanLoopOutput) *DescribeHumanLoopOutput {
   830  	s.HumanLoopOutput = v
   831  	return s
   832  }
   833  
   834  // SetHumanLoopStatus sets the HumanLoopStatus field's value.
   835  func (s *DescribeHumanLoopOutput) SetHumanLoopStatus(v string) *DescribeHumanLoopOutput {
   836  	s.HumanLoopStatus = &v
   837  	return s
   838  }
   839  
   840  // Attributes of the data specified by the customer. Use these to describe the
   841  // data to be labeled.
   842  type HumanLoopDataAttributes struct {
   843  	_ struct{} `type:"structure"`
   844  
   845  	// Declares that your content is free of personally identifiable information
   846  	// or adult content.
   847  	//
   848  	// Amazon SageMaker can restrict the Amazon Mechanical Turk workers who can
   849  	// view your task based on this information.
   850  	//
   851  	// ContentClassifiers is a required field
   852  	ContentClassifiers []*string `type:"list" required:"true"`
   853  }
   854  
   855  // String returns the string representation.
   856  //
   857  // API parameter values that are decorated as "sensitive" in the API will not
   858  // be included in the string output. The member name will be present, but the
   859  // value will be replaced with "sensitive".
   860  func (s HumanLoopDataAttributes) String() string {
   861  	return awsutil.Prettify(s)
   862  }
   863  
   864  // GoString returns the string representation.
   865  //
   866  // API parameter values that are decorated as "sensitive" in the API will not
   867  // be included in the string output. The member name will be present, but the
   868  // value will be replaced with "sensitive".
   869  func (s HumanLoopDataAttributes) GoString() string {
   870  	return s.String()
   871  }
   872  
   873  // Validate inspects the fields of the type to determine if they are valid.
   874  func (s *HumanLoopDataAttributes) Validate() error {
   875  	invalidParams := request.ErrInvalidParams{Context: "HumanLoopDataAttributes"}
   876  	if s.ContentClassifiers == nil {
   877  		invalidParams.Add(request.NewErrParamRequired("ContentClassifiers"))
   878  	}
   879  
   880  	if invalidParams.Len() > 0 {
   881  		return invalidParams
   882  	}
   883  	return nil
   884  }
   885  
   886  // SetContentClassifiers sets the ContentClassifiers field's value.
   887  func (s *HumanLoopDataAttributes) SetContentClassifiers(v []*string) *HumanLoopDataAttributes {
   888  	s.ContentClassifiers = v
   889  	return s
   890  }
   891  
   892  // An object containing the human loop input in JSON format.
   893  type HumanLoopInput struct {
   894  	_ struct{} `type:"structure"`
   895  
   896  	// Serialized input from the human loop. The input must be a string representation
   897  	// of a file in JSON format.
   898  	//
   899  	// InputContent is a required field
   900  	InputContent *string `type:"string" required:"true"`
   901  }
   902  
   903  // String returns the string representation.
   904  //
   905  // API parameter values that are decorated as "sensitive" in the API will not
   906  // be included in the string output. The member name will be present, but the
   907  // value will be replaced with "sensitive".
   908  func (s HumanLoopInput) String() string {
   909  	return awsutil.Prettify(s)
   910  }
   911  
   912  // GoString returns the string representation.
   913  //
   914  // API parameter values that are decorated as "sensitive" in the API will not
   915  // be included in the string output. The member name will be present, but the
   916  // value will be replaced with "sensitive".
   917  func (s HumanLoopInput) GoString() string {
   918  	return s.String()
   919  }
   920  
   921  // Validate inspects the fields of the type to determine if they are valid.
   922  func (s *HumanLoopInput) Validate() error {
   923  	invalidParams := request.ErrInvalidParams{Context: "HumanLoopInput"}
   924  	if s.InputContent == nil {
   925  		invalidParams.Add(request.NewErrParamRequired("InputContent"))
   926  	}
   927  
   928  	if invalidParams.Len() > 0 {
   929  		return invalidParams
   930  	}
   931  	return nil
   932  }
   933  
   934  // SetInputContent sets the InputContent field's value.
   935  func (s *HumanLoopInput) SetInputContent(v string) *HumanLoopInput {
   936  	s.InputContent = &v
   937  	return s
   938  }
   939  
   940  // Information about where the human output will be stored.
   941  type HumanLoopOutput struct {
   942  	_ struct{} `type:"structure"`
   943  
   944  	// The location of the Amazon S3 object where Amazon Augmented AI stores your
   945  	// human loop output.
   946  	//
   947  	// OutputS3Uri is a required field
   948  	OutputS3Uri *string `type:"string" required:"true"`
   949  }
   950  
   951  // String returns the string representation.
   952  //
   953  // API parameter values that are decorated as "sensitive" in the API will not
   954  // be included in the string output. The member name will be present, but the
   955  // value will be replaced with "sensitive".
   956  func (s HumanLoopOutput) String() string {
   957  	return awsutil.Prettify(s)
   958  }
   959  
   960  // GoString returns the string representation.
   961  //
   962  // API parameter values that are decorated as "sensitive" in the API will not
   963  // be included in the string output. The member name will be present, but the
   964  // value will be replaced with "sensitive".
   965  func (s HumanLoopOutput) GoString() string {
   966  	return s.String()
   967  }
   968  
   969  // SetOutputS3Uri sets the OutputS3Uri field's value.
   970  func (s *HumanLoopOutput) SetOutputS3Uri(v string) *HumanLoopOutput {
   971  	s.OutputS3Uri = &v
   972  	return s
   973  }
   974  
   975  // Summary information about the human loop.
   976  type HumanLoopSummary struct {
   977  	_ struct{} `type:"structure"`
   978  
   979  	// When Amazon Augmented AI created the human loop.
   980  	CreationTime *time.Time `type:"timestamp"`
   981  
   982  	// The reason why the human loop failed. A failure reason is returned when the
   983  	// status of the human loop is Failed.
   984  	FailureReason *string `type:"string"`
   985  
   986  	// The Amazon Resource Name (ARN) of the flow definition used to configure the
   987  	// human loop.
   988  	FlowDefinitionArn *string `type:"string"`
   989  
   990  	// The name of the human loop.
   991  	HumanLoopName *string `min:"1" type:"string"`
   992  
   993  	// The status of the human loop.
   994  	HumanLoopStatus *string `type:"string" enum:"HumanLoopStatus"`
   995  }
   996  
   997  // String returns the string representation.
   998  //
   999  // API parameter values that are decorated as "sensitive" in the API will not
  1000  // be included in the string output. The member name will be present, but the
  1001  // value will be replaced with "sensitive".
  1002  func (s HumanLoopSummary) String() string {
  1003  	return awsutil.Prettify(s)
  1004  }
  1005  
  1006  // GoString returns the string representation.
  1007  //
  1008  // API parameter values that are decorated as "sensitive" in the API will not
  1009  // be included in the string output. The member name will be present, but the
  1010  // value will be replaced with "sensitive".
  1011  func (s HumanLoopSummary) GoString() string {
  1012  	return s.String()
  1013  }
  1014  
  1015  // SetCreationTime sets the CreationTime field's value.
  1016  func (s *HumanLoopSummary) SetCreationTime(v time.Time) *HumanLoopSummary {
  1017  	s.CreationTime = &v
  1018  	return s
  1019  }
  1020  
  1021  // SetFailureReason sets the FailureReason field's value.
  1022  func (s *HumanLoopSummary) SetFailureReason(v string) *HumanLoopSummary {
  1023  	s.FailureReason = &v
  1024  	return s
  1025  }
  1026  
  1027  // SetFlowDefinitionArn sets the FlowDefinitionArn field's value.
  1028  func (s *HumanLoopSummary) SetFlowDefinitionArn(v string) *HumanLoopSummary {
  1029  	s.FlowDefinitionArn = &v
  1030  	return s
  1031  }
  1032  
  1033  // SetHumanLoopName sets the HumanLoopName field's value.
  1034  func (s *HumanLoopSummary) SetHumanLoopName(v string) *HumanLoopSummary {
  1035  	s.HumanLoopName = &v
  1036  	return s
  1037  }
  1038  
  1039  // SetHumanLoopStatus sets the HumanLoopStatus field's value.
  1040  func (s *HumanLoopSummary) SetHumanLoopStatus(v string) *HumanLoopSummary {
  1041  	s.HumanLoopStatus = &v
  1042  	return s
  1043  }
  1044  
  1045  // We couldn't process your request because of an issue with the server. Try
  1046  // again later.
  1047  type InternalServerException struct {
  1048  	_            struct{}                  `type:"structure"`
  1049  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1050  
  1051  	Message_ *string `locationName:"Message" type:"string"`
  1052  }
  1053  
  1054  // String returns the string representation.
  1055  //
  1056  // API parameter values that are decorated as "sensitive" in the API will not
  1057  // be included in the string output. The member name will be present, but the
  1058  // value will be replaced with "sensitive".
  1059  func (s InternalServerException) String() string {
  1060  	return awsutil.Prettify(s)
  1061  }
  1062  
  1063  // GoString returns the string representation.
  1064  //
  1065  // API parameter values that are decorated as "sensitive" in the API will not
  1066  // be included in the string output. The member name will be present, but the
  1067  // value will be replaced with "sensitive".
  1068  func (s InternalServerException) GoString() string {
  1069  	return s.String()
  1070  }
  1071  
  1072  func newErrorInternalServerException(v protocol.ResponseMetadata) error {
  1073  	return &InternalServerException{
  1074  		RespMetadata: v,
  1075  	}
  1076  }
  1077  
  1078  // Code returns the exception type name.
  1079  func (s *InternalServerException) Code() string {
  1080  	return "InternalServerException"
  1081  }
  1082  
  1083  // Message returns the exception's message.
  1084  func (s *InternalServerException) Message() string {
  1085  	if s.Message_ != nil {
  1086  		return *s.Message_
  1087  	}
  1088  	return ""
  1089  }
  1090  
  1091  // OrigErr always returns nil, satisfies awserr.Error interface.
  1092  func (s *InternalServerException) OrigErr() error {
  1093  	return nil
  1094  }
  1095  
  1096  func (s *InternalServerException) Error() string {
  1097  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  1098  }
  1099  
  1100  // Status code returns the HTTP status code for the request's response error.
  1101  func (s *InternalServerException) StatusCode() int {
  1102  	return s.RespMetadata.StatusCode
  1103  }
  1104  
  1105  // RequestID returns the service's response RequestID for request.
  1106  func (s *InternalServerException) RequestID() string {
  1107  	return s.RespMetadata.RequestID
  1108  }
  1109  
  1110  type ListHumanLoopsInput struct {
  1111  	_ struct{} `type:"structure" nopayload:"true"`
  1112  
  1113  	// (Optional) The timestamp of the date when you want the human loops to begin
  1114  	// in ISO 8601 format. For example, 2020-02-24.
  1115  	CreationTimeAfter *time.Time `location:"querystring" locationName:"CreationTimeAfter" type:"timestamp"`
  1116  
  1117  	// (Optional) The timestamp of the date before which you want the human loops
  1118  	// to begin in ISO 8601 format. For example, 2020-02-24.
  1119  	CreationTimeBefore *time.Time `location:"querystring" locationName:"CreationTimeBefore" type:"timestamp"`
  1120  
  1121  	// The Amazon Resource Name (ARN) of a flow definition.
  1122  	//
  1123  	// FlowDefinitionArn is a required field
  1124  	FlowDefinitionArn *string `location:"querystring" locationName:"FlowDefinitionArn" type:"string" required:"true"`
  1125  
  1126  	// The total number of items to return. If the total number of available items
  1127  	// is more than the value specified in MaxResults, then a NextToken is returned
  1128  	// in the output. You can use this token to display the next page of results.
  1129  	MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"`
  1130  
  1131  	// A token to display the next page of results.
  1132  	NextToken *string `location:"querystring" locationName:"NextToken" type:"string"`
  1133  
  1134  	// Optional. The order for displaying results. Valid values: Ascending and Descending.
  1135  	SortOrder *string `location:"querystring" locationName:"SortOrder" type:"string" enum:"SortOrder"`
  1136  }
  1137  
  1138  // String returns the string representation.
  1139  //
  1140  // API parameter values that are decorated as "sensitive" in the API will not
  1141  // be included in the string output. The member name will be present, but the
  1142  // value will be replaced with "sensitive".
  1143  func (s ListHumanLoopsInput) String() string {
  1144  	return awsutil.Prettify(s)
  1145  }
  1146  
  1147  // GoString returns the string representation.
  1148  //
  1149  // API parameter values that are decorated as "sensitive" in the API will not
  1150  // be included in the string output. The member name will be present, but the
  1151  // value will be replaced with "sensitive".
  1152  func (s ListHumanLoopsInput) GoString() string {
  1153  	return s.String()
  1154  }
  1155  
  1156  // Validate inspects the fields of the type to determine if they are valid.
  1157  func (s *ListHumanLoopsInput) Validate() error {
  1158  	invalidParams := request.ErrInvalidParams{Context: "ListHumanLoopsInput"}
  1159  	if s.FlowDefinitionArn == nil {
  1160  		invalidParams.Add(request.NewErrParamRequired("FlowDefinitionArn"))
  1161  	}
  1162  	if s.MaxResults != nil && *s.MaxResults < 1 {
  1163  		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  1164  	}
  1165  
  1166  	if invalidParams.Len() > 0 {
  1167  		return invalidParams
  1168  	}
  1169  	return nil
  1170  }
  1171  
  1172  // SetCreationTimeAfter sets the CreationTimeAfter field's value.
  1173  func (s *ListHumanLoopsInput) SetCreationTimeAfter(v time.Time) *ListHumanLoopsInput {
  1174  	s.CreationTimeAfter = &v
  1175  	return s
  1176  }
  1177  
  1178  // SetCreationTimeBefore sets the CreationTimeBefore field's value.
  1179  func (s *ListHumanLoopsInput) SetCreationTimeBefore(v time.Time) *ListHumanLoopsInput {
  1180  	s.CreationTimeBefore = &v
  1181  	return s
  1182  }
  1183  
  1184  // SetFlowDefinitionArn sets the FlowDefinitionArn field's value.
  1185  func (s *ListHumanLoopsInput) SetFlowDefinitionArn(v string) *ListHumanLoopsInput {
  1186  	s.FlowDefinitionArn = &v
  1187  	return s
  1188  }
  1189  
  1190  // SetMaxResults sets the MaxResults field's value.
  1191  func (s *ListHumanLoopsInput) SetMaxResults(v int64) *ListHumanLoopsInput {
  1192  	s.MaxResults = &v
  1193  	return s
  1194  }
  1195  
  1196  // SetNextToken sets the NextToken field's value.
  1197  func (s *ListHumanLoopsInput) SetNextToken(v string) *ListHumanLoopsInput {
  1198  	s.NextToken = &v
  1199  	return s
  1200  }
  1201  
  1202  // SetSortOrder sets the SortOrder field's value.
  1203  func (s *ListHumanLoopsInput) SetSortOrder(v string) *ListHumanLoopsInput {
  1204  	s.SortOrder = &v
  1205  	return s
  1206  }
  1207  
  1208  type ListHumanLoopsOutput struct {
  1209  	_ struct{} `type:"structure"`
  1210  
  1211  	// An array of objects that contain information about the human loops.
  1212  	//
  1213  	// HumanLoopSummaries is a required field
  1214  	HumanLoopSummaries []*HumanLoopSummary `type:"list" required:"true"`
  1215  
  1216  	// A token to display the next page of results.
  1217  	NextToken *string `type:"string"`
  1218  }
  1219  
  1220  // String returns the string representation.
  1221  //
  1222  // API parameter values that are decorated as "sensitive" in the API will not
  1223  // be included in the string output. The member name will be present, but the
  1224  // value will be replaced with "sensitive".
  1225  func (s ListHumanLoopsOutput) String() string {
  1226  	return awsutil.Prettify(s)
  1227  }
  1228  
  1229  // GoString returns the string representation.
  1230  //
  1231  // API parameter values that are decorated as "sensitive" in the API will not
  1232  // be included in the string output. The member name will be present, but the
  1233  // value will be replaced with "sensitive".
  1234  func (s ListHumanLoopsOutput) GoString() string {
  1235  	return s.String()
  1236  }
  1237  
  1238  // SetHumanLoopSummaries sets the HumanLoopSummaries field's value.
  1239  func (s *ListHumanLoopsOutput) SetHumanLoopSummaries(v []*HumanLoopSummary) *ListHumanLoopsOutput {
  1240  	s.HumanLoopSummaries = v
  1241  	return s
  1242  }
  1243  
  1244  // SetNextToken sets the NextToken field's value.
  1245  func (s *ListHumanLoopsOutput) SetNextToken(v string) *ListHumanLoopsOutput {
  1246  	s.NextToken = &v
  1247  	return s
  1248  }
  1249  
  1250  // We couldn't find the requested resource. Check that your resources exists
  1251  // and were created in the same AWS Region as your request, and try your request
  1252  // again.
  1253  type ResourceNotFoundException struct {
  1254  	_            struct{}                  `type:"structure"`
  1255  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1256  
  1257  	Message_ *string `locationName:"Message" type:"string"`
  1258  }
  1259  
  1260  // String returns the string representation.
  1261  //
  1262  // API parameter values that are decorated as "sensitive" in the API will not
  1263  // be included in the string output. The member name will be present, but the
  1264  // value will be replaced with "sensitive".
  1265  func (s ResourceNotFoundException) String() string {
  1266  	return awsutil.Prettify(s)
  1267  }
  1268  
  1269  // GoString returns the string representation.
  1270  //
  1271  // API parameter values that are decorated as "sensitive" in the API will not
  1272  // be included in the string output. The member name will be present, but the
  1273  // value will be replaced with "sensitive".
  1274  func (s ResourceNotFoundException) GoString() string {
  1275  	return s.String()
  1276  }
  1277  
  1278  func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
  1279  	return &ResourceNotFoundException{
  1280  		RespMetadata: v,
  1281  	}
  1282  }
  1283  
  1284  // Code returns the exception type name.
  1285  func (s *ResourceNotFoundException) Code() string {
  1286  	return "ResourceNotFoundException"
  1287  }
  1288  
  1289  // Message returns the exception's message.
  1290  func (s *ResourceNotFoundException) Message() string {
  1291  	if s.Message_ != nil {
  1292  		return *s.Message_
  1293  	}
  1294  	return ""
  1295  }
  1296  
  1297  // OrigErr always returns nil, satisfies awserr.Error interface.
  1298  func (s *ResourceNotFoundException) OrigErr() error {
  1299  	return nil
  1300  }
  1301  
  1302  func (s *ResourceNotFoundException) Error() string {
  1303  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  1304  }
  1305  
  1306  // Status code returns the HTTP status code for the request's response error.
  1307  func (s *ResourceNotFoundException) StatusCode() int {
  1308  	return s.RespMetadata.StatusCode
  1309  }
  1310  
  1311  // RequestID returns the service's response RequestID for request.
  1312  func (s *ResourceNotFoundException) RequestID() string {
  1313  	return s.RespMetadata.RequestID
  1314  }
  1315  
  1316  // You exceeded your service quota. Service quotas, also referred to as limits,
  1317  // are the maximum number of service resources or operations for your AWS account.
  1318  // For a list of Amazon A2I service quotes, see Amazon Augmented AI Service
  1319  // Quotes (https://docs.aws.amazon.com/general/latest/gr/a2i.html). Delete some
  1320  // resources or request an increase in your service quota. You can request a
  1321  // quota increase using Service Quotas or the AWS Support Center. To request
  1322  // an increase, see AWS Service Quotas (https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html)
  1323  // in the AWS General Reference.
  1324  type ServiceQuotaExceededException struct {
  1325  	_            struct{}                  `type:"structure"`
  1326  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1327  
  1328  	Message_ *string `locationName:"Message" type:"string"`
  1329  }
  1330  
  1331  // String returns the string representation.
  1332  //
  1333  // API parameter values that are decorated as "sensitive" in the API will not
  1334  // be included in the string output. The member name will be present, but the
  1335  // value will be replaced with "sensitive".
  1336  func (s ServiceQuotaExceededException) String() string {
  1337  	return awsutil.Prettify(s)
  1338  }
  1339  
  1340  // GoString returns the string representation.
  1341  //
  1342  // API parameter values that are decorated as "sensitive" in the API will not
  1343  // be included in the string output. The member name will be present, but the
  1344  // value will be replaced with "sensitive".
  1345  func (s ServiceQuotaExceededException) GoString() string {
  1346  	return s.String()
  1347  }
  1348  
  1349  func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error {
  1350  	return &ServiceQuotaExceededException{
  1351  		RespMetadata: v,
  1352  	}
  1353  }
  1354  
  1355  // Code returns the exception type name.
  1356  func (s *ServiceQuotaExceededException) Code() string {
  1357  	return "ServiceQuotaExceededException"
  1358  }
  1359  
  1360  // Message returns the exception's message.
  1361  func (s *ServiceQuotaExceededException) Message() string {
  1362  	if s.Message_ != nil {
  1363  		return *s.Message_
  1364  	}
  1365  	return ""
  1366  }
  1367  
  1368  // OrigErr always returns nil, satisfies awserr.Error interface.
  1369  func (s *ServiceQuotaExceededException) OrigErr() error {
  1370  	return nil
  1371  }
  1372  
  1373  func (s *ServiceQuotaExceededException) Error() string {
  1374  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  1375  }
  1376  
  1377  // Status code returns the HTTP status code for the request's response error.
  1378  func (s *ServiceQuotaExceededException) StatusCode() int {
  1379  	return s.RespMetadata.StatusCode
  1380  }
  1381  
  1382  // RequestID returns the service's response RequestID for request.
  1383  func (s *ServiceQuotaExceededException) RequestID() string {
  1384  	return s.RespMetadata.RequestID
  1385  }
  1386  
  1387  type StartHumanLoopInput struct {
  1388  	_ struct{} `type:"structure"`
  1389  
  1390  	// Attributes of the specified data. Use DataAttributes to specify if your data
  1391  	// is free of personally identifiable information and/or free of adult content.
  1392  	DataAttributes *HumanLoopDataAttributes `type:"structure"`
  1393  
  1394  	// The Amazon Resource Name (ARN) of the flow definition associated with this
  1395  	// human loop.
  1396  	//
  1397  	// FlowDefinitionArn is a required field
  1398  	FlowDefinitionArn *string `type:"string" required:"true"`
  1399  
  1400  	// An object that contains information about the human loop.
  1401  	//
  1402  	// HumanLoopInput is a required field
  1403  	HumanLoopInput *HumanLoopInput `type:"structure" required:"true"`
  1404  
  1405  	// The name of the human loop.
  1406  	//
  1407  	// HumanLoopName is a required field
  1408  	HumanLoopName *string `min:"1" type:"string" required:"true"`
  1409  }
  1410  
  1411  // String returns the string representation.
  1412  //
  1413  // API parameter values that are decorated as "sensitive" in the API will not
  1414  // be included in the string output. The member name will be present, but the
  1415  // value will be replaced with "sensitive".
  1416  func (s StartHumanLoopInput) String() string {
  1417  	return awsutil.Prettify(s)
  1418  }
  1419  
  1420  // GoString returns the string representation.
  1421  //
  1422  // API parameter values that are decorated as "sensitive" in the API will not
  1423  // be included in the string output. The member name will be present, but the
  1424  // value will be replaced with "sensitive".
  1425  func (s StartHumanLoopInput) GoString() string {
  1426  	return s.String()
  1427  }
  1428  
  1429  // Validate inspects the fields of the type to determine if they are valid.
  1430  func (s *StartHumanLoopInput) Validate() error {
  1431  	invalidParams := request.ErrInvalidParams{Context: "StartHumanLoopInput"}
  1432  	if s.FlowDefinitionArn == nil {
  1433  		invalidParams.Add(request.NewErrParamRequired("FlowDefinitionArn"))
  1434  	}
  1435  	if s.HumanLoopInput == nil {
  1436  		invalidParams.Add(request.NewErrParamRequired("HumanLoopInput"))
  1437  	}
  1438  	if s.HumanLoopName == nil {
  1439  		invalidParams.Add(request.NewErrParamRequired("HumanLoopName"))
  1440  	}
  1441  	if s.HumanLoopName != nil && len(*s.HumanLoopName) < 1 {
  1442  		invalidParams.Add(request.NewErrParamMinLen("HumanLoopName", 1))
  1443  	}
  1444  	if s.DataAttributes != nil {
  1445  		if err := s.DataAttributes.Validate(); err != nil {
  1446  			invalidParams.AddNested("DataAttributes", err.(request.ErrInvalidParams))
  1447  		}
  1448  	}
  1449  	if s.HumanLoopInput != nil {
  1450  		if err := s.HumanLoopInput.Validate(); err != nil {
  1451  			invalidParams.AddNested("HumanLoopInput", err.(request.ErrInvalidParams))
  1452  		}
  1453  	}
  1454  
  1455  	if invalidParams.Len() > 0 {
  1456  		return invalidParams
  1457  	}
  1458  	return nil
  1459  }
  1460  
  1461  // SetDataAttributes sets the DataAttributes field's value.
  1462  func (s *StartHumanLoopInput) SetDataAttributes(v *HumanLoopDataAttributes) *StartHumanLoopInput {
  1463  	s.DataAttributes = v
  1464  	return s
  1465  }
  1466  
  1467  // SetFlowDefinitionArn sets the FlowDefinitionArn field's value.
  1468  func (s *StartHumanLoopInput) SetFlowDefinitionArn(v string) *StartHumanLoopInput {
  1469  	s.FlowDefinitionArn = &v
  1470  	return s
  1471  }
  1472  
  1473  // SetHumanLoopInput sets the HumanLoopInput field's value.
  1474  func (s *StartHumanLoopInput) SetHumanLoopInput(v *HumanLoopInput) *StartHumanLoopInput {
  1475  	s.HumanLoopInput = v
  1476  	return s
  1477  }
  1478  
  1479  // SetHumanLoopName sets the HumanLoopName field's value.
  1480  func (s *StartHumanLoopInput) SetHumanLoopName(v string) *StartHumanLoopInput {
  1481  	s.HumanLoopName = &v
  1482  	return s
  1483  }
  1484  
  1485  type StartHumanLoopOutput struct {
  1486  	_ struct{} `type:"structure"`
  1487  
  1488  	// The Amazon Resource Name (ARN) of the human loop.
  1489  	HumanLoopArn *string `type:"string"`
  1490  }
  1491  
  1492  // String returns the string representation.
  1493  //
  1494  // API parameter values that are decorated as "sensitive" in the API will not
  1495  // be included in the string output. The member name will be present, but the
  1496  // value will be replaced with "sensitive".
  1497  func (s StartHumanLoopOutput) String() string {
  1498  	return awsutil.Prettify(s)
  1499  }
  1500  
  1501  // GoString returns the string representation.
  1502  //
  1503  // API parameter values that are decorated as "sensitive" in the API will not
  1504  // be included in the string output. The member name will be present, but the
  1505  // value will be replaced with "sensitive".
  1506  func (s StartHumanLoopOutput) GoString() string {
  1507  	return s.String()
  1508  }
  1509  
  1510  // SetHumanLoopArn sets the HumanLoopArn field's value.
  1511  func (s *StartHumanLoopOutput) SetHumanLoopArn(v string) *StartHumanLoopOutput {
  1512  	s.HumanLoopArn = &v
  1513  	return s
  1514  }
  1515  
  1516  type StopHumanLoopInput struct {
  1517  	_ struct{} `type:"structure"`
  1518  
  1519  	// The name of the human loop that you want to stop.
  1520  	//
  1521  	// HumanLoopName is a required field
  1522  	HumanLoopName *string `min:"1" type:"string" required:"true"`
  1523  }
  1524  
  1525  // String returns the string representation.
  1526  //
  1527  // API parameter values that are decorated as "sensitive" in the API will not
  1528  // be included in the string output. The member name will be present, but the
  1529  // value will be replaced with "sensitive".
  1530  func (s StopHumanLoopInput) String() string {
  1531  	return awsutil.Prettify(s)
  1532  }
  1533  
  1534  // GoString returns the string representation.
  1535  //
  1536  // API parameter values that are decorated as "sensitive" in the API will not
  1537  // be included in the string output. The member name will be present, but the
  1538  // value will be replaced with "sensitive".
  1539  func (s StopHumanLoopInput) GoString() string {
  1540  	return s.String()
  1541  }
  1542  
  1543  // Validate inspects the fields of the type to determine if they are valid.
  1544  func (s *StopHumanLoopInput) Validate() error {
  1545  	invalidParams := request.ErrInvalidParams{Context: "StopHumanLoopInput"}
  1546  	if s.HumanLoopName == nil {
  1547  		invalidParams.Add(request.NewErrParamRequired("HumanLoopName"))
  1548  	}
  1549  	if s.HumanLoopName != nil && len(*s.HumanLoopName) < 1 {
  1550  		invalidParams.Add(request.NewErrParamMinLen("HumanLoopName", 1))
  1551  	}
  1552  
  1553  	if invalidParams.Len() > 0 {
  1554  		return invalidParams
  1555  	}
  1556  	return nil
  1557  }
  1558  
  1559  // SetHumanLoopName sets the HumanLoopName field's value.
  1560  func (s *StopHumanLoopInput) SetHumanLoopName(v string) *StopHumanLoopInput {
  1561  	s.HumanLoopName = &v
  1562  	return s
  1563  }
  1564  
  1565  type StopHumanLoopOutput struct {
  1566  	_ struct{} `type:"structure" nopayload:"true"`
  1567  }
  1568  
  1569  // String returns the string representation.
  1570  //
  1571  // API parameter values that are decorated as "sensitive" in the API will not
  1572  // be included in the string output. The member name will be present, but the
  1573  // value will be replaced with "sensitive".
  1574  func (s StopHumanLoopOutput) String() string {
  1575  	return awsutil.Prettify(s)
  1576  }
  1577  
  1578  // GoString returns the string representation.
  1579  //
  1580  // API parameter values that are decorated as "sensitive" in the API will not
  1581  // be included in the string output. The member name will be present, but the
  1582  // value will be replaced with "sensitive".
  1583  func (s StopHumanLoopOutput) GoString() string {
  1584  	return s.String()
  1585  }
  1586  
  1587  // You exceeded the maximum number of requests.
  1588  type ThrottlingException struct {
  1589  	_            struct{}                  `type:"structure"`
  1590  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1591  
  1592  	Message_ *string `locationName:"Message" type:"string"`
  1593  }
  1594  
  1595  // String returns the string representation.
  1596  //
  1597  // API parameter values that are decorated as "sensitive" in the API will not
  1598  // be included in the string output. The member name will be present, but the
  1599  // value will be replaced with "sensitive".
  1600  func (s ThrottlingException) String() string {
  1601  	return awsutil.Prettify(s)
  1602  }
  1603  
  1604  // GoString returns the string representation.
  1605  //
  1606  // API parameter values that are decorated as "sensitive" in the API will not
  1607  // be included in the string output. The member name will be present, but the
  1608  // value will be replaced with "sensitive".
  1609  func (s ThrottlingException) GoString() string {
  1610  	return s.String()
  1611  }
  1612  
  1613  func newErrorThrottlingException(v protocol.ResponseMetadata) error {
  1614  	return &ThrottlingException{
  1615  		RespMetadata: v,
  1616  	}
  1617  }
  1618  
  1619  // Code returns the exception type name.
  1620  func (s *ThrottlingException) Code() string {
  1621  	return "ThrottlingException"
  1622  }
  1623  
  1624  // Message returns the exception's message.
  1625  func (s *ThrottlingException) Message() string {
  1626  	if s.Message_ != nil {
  1627  		return *s.Message_
  1628  	}
  1629  	return ""
  1630  }
  1631  
  1632  // OrigErr always returns nil, satisfies awserr.Error interface.
  1633  func (s *ThrottlingException) OrigErr() error {
  1634  	return nil
  1635  }
  1636  
  1637  func (s *ThrottlingException) Error() string {
  1638  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  1639  }
  1640  
  1641  // Status code returns the HTTP status code for the request's response error.
  1642  func (s *ThrottlingException) StatusCode() int {
  1643  	return s.RespMetadata.StatusCode
  1644  }
  1645  
  1646  // RequestID returns the service's response RequestID for request.
  1647  func (s *ThrottlingException) RequestID() string {
  1648  	return s.RespMetadata.RequestID
  1649  }
  1650  
  1651  // The request isn't valid. Check the syntax and try again.
  1652  type ValidationException struct {
  1653  	_            struct{}                  `type:"structure"`
  1654  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1655  
  1656  	Message_ *string `locationName:"Message" type:"string"`
  1657  }
  1658  
  1659  // String returns the string representation.
  1660  //
  1661  // API parameter values that are decorated as "sensitive" in the API will not
  1662  // be included in the string output. The member name will be present, but the
  1663  // value will be replaced with "sensitive".
  1664  func (s ValidationException) String() string {
  1665  	return awsutil.Prettify(s)
  1666  }
  1667  
  1668  // GoString returns the string representation.
  1669  //
  1670  // API parameter values that are decorated as "sensitive" in the API will not
  1671  // be included in the string output. The member name will be present, but the
  1672  // value will be replaced with "sensitive".
  1673  func (s ValidationException) GoString() string {
  1674  	return s.String()
  1675  }
  1676  
  1677  func newErrorValidationException(v protocol.ResponseMetadata) error {
  1678  	return &ValidationException{
  1679  		RespMetadata: v,
  1680  	}
  1681  }
  1682  
  1683  // Code returns the exception type name.
  1684  func (s *ValidationException) Code() string {
  1685  	return "ValidationException"
  1686  }
  1687  
  1688  // Message returns the exception's message.
  1689  func (s *ValidationException) Message() string {
  1690  	if s.Message_ != nil {
  1691  		return *s.Message_
  1692  	}
  1693  	return ""
  1694  }
  1695  
  1696  // OrigErr always returns nil, satisfies awserr.Error interface.
  1697  func (s *ValidationException) OrigErr() error {
  1698  	return nil
  1699  }
  1700  
  1701  func (s *ValidationException) Error() string {
  1702  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  1703  }
  1704  
  1705  // Status code returns the HTTP status code for the request's response error.
  1706  func (s *ValidationException) StatusCode() int {
  1707  	return s.RespMetadata.StatusCode
  1708  }
  1709  
  1710  // RequestID returns the service's response RequestID for request.
  1711  func (s *ValidationException) RequestID() string {
  1712  	return s.RespMetadata.RequestID
  1713  }
  1714  
  1715  const (
  1716  	// ContentClassifierFreeOfPersonallyIdentifiableInformation is a ContentClassifier enum value
  1717  	ContentClassifierFreeOfPersonallyIdentifiableInformation = "FreeOfPersonallyIdentifiableInformation"
  1718  
  1719  	// ContentClassifierFreeOfAdultContent is a ContentClassifier enum value
  1720  	ContentClassifierFreeOfAdultContent = "FreeOfAdultContent"
  1721  )
  1722  
  1723  // ContentClassifier_Values returns all elements of the ContentClassifier enum
  1724  func ContentClassifier_Values() []string {
  1725  	return []string{
  1726  		ContentClassifierFreeOfPersonallyIdentifiableInformation,
  1727  		ContentClassifierFreeOfAdultContent,
  1728  	}
  1729  }
  1730  
  1731  const (
  1732  	// HumanLoopStatusInProgress is a HumanLoopStatus enum value
  1733  	HumanLoopStatusInProgress = "InProgress"
  1734  
  1735  	// HumanLoopStatusFailed is a HumanLoopStatus enum value
  1736  	HumanLoopStatusFailed = "Failed"
  1737  
  1738  	// HumanLoopStatusCompleted is a HumanLoopStatus enum value
  1739  	HumanLoopStatusCompleted = "Completed"
  1740  
  1741  	// HumanLoopStatusStopped is a HumanLoopStatus enum value
  1742  	HumanLoopStatusStopped = "Stopped"
  1743  
  1744  	// HumanLoopStatusStopping is a HumanLoopStatus enum value
  1745  	HumanLoopStatusStopping = "Stopping"
  1746  )
  1747  
  1748  // HumanLoopStatus_Values returns all elements of the HumanLoopStatus enum
  1749  func HumanLoopStatus_Values() []string {
  1750  	return []string{
  1751  		HumanLoopStatusInProgress,
  1752  		HumanLoopStatusFailed,
  1753  		HumanLoopStatusCompleted,
  1754  		HumanLoopStatusStopped,
  1755  		HumanLoopStatusStopping,
  1756  	}
  1757  }
  1758  
  1759  const (
  1760  	// SortOrderAscending is a SortOrder enum value
  1761  	SortOrderAscending = "Ascending"
  1762  
  1763  	// SortOrderDescending is a SortOrder enum value
  1764  	SortOrderDescending = "Descending"
  1765  )
  1766  
  1767  // SortOrder_Values returns all elements of the SortOrder enum
  1768  func SortOrder_Values() []string {
  1769  	return []string{
  1770  		SortOrderAscending,
  1771  		SortOrderDescending,
  1772  	}
  1773  }