func (s *SendSSHPublicKeyInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "SendSSHPublicKeyInput"}
	if s.AvailabilityZone == nil {
		invalidParams.Add(request.NewErrParamRequired("AvailabilityZone"))
	}
	if s.AvailabilityZone != nil && len(*s.AvailabilityZone) < 6 {
		invalidParams.Add(request.NewErrParamMinLen("AvailabilityZone", 6))
	}
	if s.InstanceId == nil {
		invalidParams.Add(request.NewErrParamRequired("InstanceId"))
	}
	if s.InstanceId != nil && len(*s.InstanceId) < 10 {
		invalidParams.Add(request.NewErrParamMinLen("InstanceId", 10))
	}
	if s.InstanceOSUser == nil {
		invalidParams.Add(request.NewErrParamRequired("InstanceOSUser"))
	}
	if s.InstanceOSUser != nil && len(*s.InstanceOSUser) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("InstanceOSUser", 1))
	}
	if s.SSHPublicKey == nil {
		invalidParams.Add(request.NewErrParamRequired("SSHPublicKey"))
	}
	if s.SSHPublicKey != nil && len(*s.SSHPublicKey) < 256 {
		invalidParams.Add(request.NewErrParamMinLen("SSHPublicKey", 256))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}
// Validate inspects the fields of the type to determine if they are valid.
Validate inspects the fields of the type to determine if they are valid.
// Validate inspects the fields of the type to determine if they are valid .
func (s *SendSSHPublicKeyInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "SendSSHPublicKeyInput"}
	if s.AvailabilityZone == nil {
		invalidParams.Add(request.NewErrParamRequired("AvailabilityZone"))
	}
	if s.AvailabilityZone != nil && len(*s.AvailabilityZone) < 6 {
		invalidParams.Add(request.NewErrParamMinLen("AvailabilityZone", 6))
	}
	if s.InstanceId == nil {
		invalidParams.Add(request.NewErrParamRequired("InstanceId"))
	}
	if s.InstanceId != nil && len(*s.InstanceId) < 10 {
		invalidParams.Add(request.NewErrParamMinLen("InstanceId", 10))
	}
	if s.InstanceOSUser == nil {
		invalidParams.Add(request.NewErrParamRequired("InstanceOSUser"))
	}
	if s.InstanceOSUser != nil && len(*s.InstanceOSUser) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("InstanceOSUser", 1))
	}
	if s.SSHPublicKey == nil {
		invalidParams.Add(request.NewErrParamRequired("SSHPublicKey"))
	}
	if s.SSHPublicKey != nil && len(*s.SSHPublicKey) < 256 {
		invalidParams.Add(request.NewErrParamMinLen("SSHPublicKey", 256))
	}
	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}
func ( s * SendSSHPublicKeyInput ) Validate ( ) error { invalidParams := request . ErrInvalidParams { Context : " " } if s . AvailabilityZone == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . AvailabilityZone != nil && len ( * s . AvailabilityZone ) < 6 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 6 ) ) } if s . InstanceId == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . InstanceId != nil && len ( * s . InstanceId ) < 10 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 10 ) ) } if s . InstanceOSUser == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . InstanceOSUser != nil && len ( * s . InstanceOSUser ) < 1 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 1 ) ) } if s . SSHPublicKey == nil { invalidParams . Add ( request . NewErrParamRequired ( " " ) ) } if s . SSHPublicKey != nil && len ( * s . SSHPublicKey ) < 256 { invalidParams . Add ( request . NewErrParamMinLen ( " " , 256 ) ) } if invalidParams . Len ( ) > 0 { return invalidParams } return nil }
Validate inspects the fields of the type to determine if they are valid.
Validate inspects the fields of the type to determine if they are valid .