本文整理汇总了Golang中github.com/aws/aws-sdk-go/aws/request.ErrInvalidParams类的典型用法代码示例。如果您正苦于以下问题:Golang ErrInvalidParams类的具体用法?Golang ErrInvalidParams怎么用?Golang ErrInvalidParams使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ErrInvalidParams类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: Validate
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteFileSystemInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteFileSystemInput"}
if s.FileSystemId == nil {
invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
开发者ID:chamal-sapumohotti,项目名称:aws-sdk-go,代码行数:12,代码来源:api.go
示例2: Validate
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateHapgInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateHapgInput"}
if s.Label == nil {
invalidParams.Add(request.NewErrParamRequired("Label"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
开发者ID:aws,项目名称:amazon-ssm-agent,代码行数:12,代码来源:api.go
示例3: Validate
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetRepositoryTriggersInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetRepositoryTriggersInput"}
if s.RepositoryName != nil && len(*s.RepositoryName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
开发者ID:RezaDKhan,项目名称:terraform,代码行数:12,代码来源:api.go
示例4: Validate
// Validate inspects the fields of the type to determine if they are valid.
func (s *Session) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "Session"}
if s.Id != nil && len(*s.Id) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Id", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
开发者ID:xibz,项目名称:aws-sdk-go,代码行数:12,代码来源:api.go
示例5: Validate
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeScalableTargetsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DescribeScalableTargetsInput"}
if s.ServiceNamespace == nil {
invalidParams.Add(request.NewErrParamRequired("ServiceNamespace"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
开发者ID:chamal-sapumohotti,项目名称:aws-sdk-go,代码行数:12,代码来源:api.go
示例6: Validate
// Validate inspects the fields of the type to determine if they are valid.
func (s *SearchInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "SearchInput"}
if s.Query == nil {
invalidParams.Add(request.NewErrParamRequired("Query"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
开发者ID:ColourboxDevelopment,项目名称:aws-sdk-go,代码行数:12,代码来源:api.go
示例7: Validate
func (s *ConditionalStructShape) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ConditionalStructShape"}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
开发者ID:ColourboxDevelopment,项目名称:aws-sdk-go,代码行数:11,代码来源:param_validator_test.go
注:本文中的github.com/aws/aws-sdk-go/aws/request.ErrInvalidParams类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论