cloudmersive-phishing-detection-api-client 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -21
  3. data/cloudmersive-phishing-detection-api-client.gemspec +1 -1
  4. data/docs/AdvancedEmailDetectionRequest.md +14 -0
  5. data/docs/PhishingDetectionAdvancedRequest.md +9 -0
  6. data/docs/PhishingDetectionAdvancedResponse.md +10 -0
  7. data/docs/PhishingDetectionApi.md +228 -0
  8. data/docs/PhishingDetectionEmailAdvancedResponse.md +17 -0
  9. data/docs/PhishingDetectionResponse.md +8 -0
  10. data/lib/cloudmersive-phishing-detection-api-client/api/phishing_detection_api.rb +223 -0
  11. data/lib/cloudmersive-phishing-detection-api-client/api_client.rb +1 -1
  12. data/lib/cloudmersive-phishing-detection-api-client/api_error.rb +1 -1
  13. data/lib/cloudmersive-phishing-detection-api-client/configuration.rb +1 -1
  14. data/lib/cloudmersive-phishing-detection-api-client/models/{phishing_url_advanced_request.rb → advanced_email_detection_request.rb} +72 -46
  15. data/lib/cloudmersive-phishing-detection-api-client/models/{phishing_url_advanced_response_batch.rb → phishing_detection_advanced_request.rb} +18 -20
  16. data/lib/cloudmersive-phishing-detection-api-client/models/{phishing_url_response_batch.rb → phishing_detection_advanced_response.rb} +22 -14
  17. data/lib/cloudmersive-phishing-detection-api-client/models/{phishing_url_response.rb → phishing_detection_email_advanced_response.rb} +80 -40
  18. data/lib/cloudmersive-phishing-detection-api-client/models/{phishing_url_request.rb → phishing_detection_response.rb} +11 -16
  19. data/lib/cloudmersive-phishing-detection-api-client/version.rb +2 -2
  20. data/lib/cloudmersive-phishing-detection-api-client.rb +7 -10
  21. data/spec/api/phishing_detection_api_spec.rb +81 -0
  22. data/spec/api_client_spec.rb +1 -1
  23. data/spec/configuration_spec.rb +1 -1
  24. data/spec/models/{phishing_url_response_spec.rb → advanced_email_detection_request_spec.rb} +19 -13
  25. data/spec/models/{phishing_url_advanced_response_batch_spec.rb → phishing_detection_advanced_request_spec.rb} +9 -9
  26. data/spec/models/{phishing_url_advanced_request_spec.rb → phishing_detection_advanced_response_spec.rb} +10 -10
  27. data/spec/models/{phishing_url_advanced_response_spec.rb → phishing_detection_email_advanced_response_spec.rb} +16 -22
  28. data/spec/models/{phishing_url_request_spec.rb → phishing_detection_response_spec.rb} +8 -8
  29. data/spec/spec_helper.rb +1 -1
  30. metadata +20 -29
  31. data/docs/PhishingUrlAdvancedRequest.md +0 -10
  32. data/docs/PhishingUrlAdvancedRequestBatch.md +0 -10
  33. data/docs/PhishingUrlAdvancedResponse.md +0 -18
  34. data/docs/PhishingUrlAdvancedResponseBatch.md +0 -9
  35. data/docs/PhishingUrlApi.md +0 -120
  36. data/docs/PhishingUrlBatchApi.md +0 -120
  37. data/docs/PhishingUrlRequest.md +0 -8
  38. data/docs/PhishingUrlResponse.md +0 -13
  39. data/docs/PhishingUrlResponseBatch.md +0 -9
  40. data/lib/cloudmersive-phishing-detection-api-client/api/phishing_url_api.rb +0 -123
  41. data/lib/cloudmersive-phishing-detection-api-client/api/phishing_url_batch_api.rb +0 -123
  42. data/lib/cloudmersive-phishing-detection-api-client/models/phishing_url_advanced_request_batch.rb +0 -217
  43. data/lib/cloudmersive-phishing-detection-api-client/models/phishing_url_advanced_response.rb +0 -286
  44. data/spec/api/phishing_url_api_spec.rb +0 -59
  45. data/spec/api/phishing_url_batch_api_spec.rb +0 -59
  46. data/spec/models/phishing_url_advanced_request_batch_spec.rb +0 -53
  47. data/spec/models/phishing_url_response_batch_spec.rb +0 -47
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #phishingapi
3
3
 
4
- #Easily and directly scan and block phishing security threats.
4
+ #Easily and directly scan and block phishing security threats in input.
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #phishingapi
3
3
 
4
- #Easily and directly scan and block phishing security threats.
4
+ #Easily and directly scan and block phishing security threats in input.
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
@@ -13,32 +13,51 @@ Swagger Codegen version: 2.4.14
13
13
  require 'date'
14
14
 
15
15
  module CloudmersivePhishingDetectionApiClient
16
- # Request data for the advanced phishing validation apis
17
- class PhishingUrlAdvancedRequest
18
- # Full url data to be evaluated
19
- attr_accessor :url
16
+ # Request to detect phishing from an email
17
+ class AdvancedEmailDetectionRequest
18
+ # Email address of the sender
19
+ attr_accessor :from_email_address
20
20
 
21
- # The caller may specify a collection of hosts or domains which are always considered safe.<br /> This is to allow internal sites to be marked as safe
22
- attr_accessor :allow_list
21
+ # Email address of the recipient
22
+ attr_accessor :to_email_address
23
23
 
24
- # The caller may specify a collection of hosts or domains which are always considered unsafe.<br /> This is to allow internal sites to be marked as safe
25
- attr_accessor :block_list
24
+ # Subject of the email
25
+ attr_accessor :subject
26
+
27
+ # Body of the email in HTML, or text
28
+ attr_accessor :html_body
29
+
30
+ # Allow email from low reputation senders and domains
31
+ attr_accessor :allow_low_reputation_senders
32
+
33
+ # True to allow sanctioned countries and certain known sanctioned entities, false otherwise (default)
34
+ attr_accessor :allow_sanctioned
35
+
36
+ attr_accessor :input_email_file
26
37
 
27
38
  # Attribute mapping from ruby-style variable name to JSON key.
28
39
  def self.attribute_map
29
40
  {
30
- :'url' => :'Url',
31
- :'allow_list' => :'AllowList',
32
- :'block_list' => :'BlockList'
41
+ :'from_email_address' => :'FromEmailAddress',
42
+ :'to_email_address' => :'ToEmailAddress',
43
+ :'subject' => :'Subject',
44
+ :'html_body' => :'HtmlBody',
45
+ :'allow_low_reputation_senders' => :'AllowLowReputationSenders',
46
+ :'allow_sanctioned' => :'AllowSanctioned',
47
+ :'input_email_file' => :'InputEmailFile'
33
48
  }
34
49
  end
35
50
 
36
51
  # Attribute type mapping.
37
52
  def self.swagger_types
38
53
  {
39
- :'url' => :'String',
40
- :'allow_list' => :'Array<String>',
41
- :'block_list' => :'Array<String>'
54
+ :'from_email_address' => :'String',
55
+ :'to_email_address' => :'String',
56
+ :'subject' => :'String',
57
+ :'html_body' => :'String',
58
+ :'allow_low_reputation_senders' => :'BOOLEAN',
59
+ :'allow_sanctioned' => :'BOOLEAN',
60
+ :'input_email_file' => :'String'
42
61
  }
43
62
  end
44
63
 
@@ -50,20 +69,32 @@ module CloudmersivePhishingDetectionApiClient
50
69
  # convert string to symbol for hash key
51
70
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
52
71
 
53
- if attributes.has_key?(:'Url')
54
- self.url = attributes[:'Url']
72
+ if attributes.has_key?(:'FromEmailAddress')
73
+ self.from_email_address = attributes[:'FromEmailAddress']
55
74
  end
56
75
 
57
- if attributes.has_key?(:'AllowList')
58
- if (value = attributes[:'AllowList']).is_a?(Array)
59
- self.allow_list = value
60
- end
76
+ if attributes.has_key?(:'ToEmailAddress')
77
+ self.to_email_address = attributes[:'ToEmailAddress']
61
78
  end
62
79
 
63
- if attributes.has_key?(:'BlockList')
64
- if (value = attributes[:'BlockList']).is_a?(Array)
65
- self.block_list = value
66
- end
80
+ if attributes.has_key?(:'Subject')
81
+ self.subject = attributes[:'Subject']
82
+ end
83
+
84
+ if attributes.has_key?(:'HtmlBody')
85
+ self.html_body = attributes[:'HtmlBody']
86
+ end
87
+
88
+ if attributes.has_key?(:'AllowLowReputationSenders')
89
+ self.allow_low_reputation_senders = attributes[:'AllowLowReputationSenders']
90
+ end
91
+
92
+ if attributes.has_key?(:'AllowSanctioned')
93
+ self.allow_sanctioned = attributes[:'AllowSanctioned']
94
+ end
95
+
96
+ if attributes.has_key?(:'InputEmailFile')
97
+ self.input_email_file = attributes[:'InputEmailFile']
67
98
  end
68
99
  end
69
100
 
@@ -71,12 +102,8 @@ module CloudmersivePhishingDetectionApiClient
71
102
  # @return Array for valid properties with the reasons
72
103
  def list_invalid_properties
73
104
  invalid_properties = Array.new
74
- if @url.nil?
75
- invalid_properties.push('invalid value for "url", url cannot be nil.')
76
- end
77
-
78
- if @url.to_s.length < 1
79
- invalid_properties.push('invalid value for "url", the character length must be great than or equal to 1.')
105
+ if !@input_email_file.nil? && @input_email_file !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
106
+ invalid_properties.push('invalid value for "input_email_file", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
80
107
  end
81
108
 
82
109
  invalid_properties
@@ -85,23 +112,18 @@ module CloudmersivePhishingDetectionApiClient
85
112
  # Check to see if the all the properties in the model are valid
86
113
  # @return true if the model is valid
87
114
  def valid?
88
- return false if @url.nil?
89
- return false if @url.to_s.length < 1
115
+ return false if !@input_email_file.nil? && @input_email_file !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
90
116
  true
91
117
  end
92
118
 
93
119
  # Custom attribute writer method with validation
94
- # @param [Object] url Value to be assigned
95
- def url=(url)
96
- if url.nil?
97
- fail ArgumentError, 'url cannot be nil'
98
- end
99
-
100
- if url.to_s.length < 1
101
- fail ArgumentError, 'invalid value for "url", the character length must be great than or equal to 1.'
120
+ # @param [Object] input_email_file Value to be assigned
121
+ def input_email_file=(input_email_file)
122
+ if !input_email_file.nil? && input_email_file !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
123
+ fail ArgumentError, 'invalid value for "input_email_file", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
102
124
  end
103
125
 
104
- @url = url
126
+ @input_email_file = input_email_file
105
127
  end
106
128
 
107
129
  # Checks equality by comparing each attribute.
@@ -109,9 +131,13 @@ module CloudmersivePhishingDetectionApiClient
109
131
  def ==(o)
110
132
  return true if self.equal?(o)
111
133
  self.class == o.class &&
112
- url == o.url &&
113
- allow_list == o.allow_list &&
114
- block_list == o.block_list
134
+ from_email_address == o.from_email_address &&
135
+ to_email_address == o.to_email_address &&
136
+ subject == o.subject &&
137
+ html_body == o.html_body &&
138
+ allow_low_reputation_senders == o.allow_low_reputation_senders &&
139
+ allow_sanctioned == o.allow_sanctioned &&
140
+ input_email_file == o.input_email_file
115
141
  end
116
142
 
117
143
  # @see the `==` method
@@ -123,7 +149,7 @@ module CloudmersivePhishingDetectionApiClient
123
149
  # Calculates hash code according to all attributes.
124
150
  # @return [Fixnum] Hash code
125
151
  def hash
126
- [url, allow_list, block_list].hash
152
+ [from_email_address, to_email_address, subject, html_body, allow_low_reputation_senders, allow_sanctioned, input_email_file].hash
127
153
  end
128
154
 
129
155
  # Builds the object from hash
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #phishingapi
3
3
 
4
- #Easily and directly scan and block phishing security threats.
4
+ #Easily and directly scan and block phishing security threats in input.
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
@@ -13,27 +13,27 @@ Swagger Codegen version: 2.4.14
13
13
  require 'date'
14
14
 
15
15
  module CloudmersivePhishingDetectionApiClient
16
- # Responses for the advanced batch calls to Phishing Url
17
- class PhishingUrlAdvancedResponseBatch
18
- # Specifies if all the urls (or its hosts or domains) in this batch call passed all the checks or not.
19
- attr_accessor :clean_result
16
+ # AI advanced phishing detection request
17
+ class PhishingDetectionAdvancedRequest
18
+ # Input text string to detect phishing against
19
+ attr_accessor :input_string
20
20
 
21
- # Resulting URL validations
22
- attr_accessor :url_responses
21
+ # Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced.
22
+ attr_accessor :model
23
23
 
24
24
  # Attribute mapping from ruby-style variable name to JSON key.
25
25
  def self.attribute_map
26
26
  {
27
- :'clean_result' => :'CleanResult',
28
- :'url_responses' => :'UrlResponses'
27
+ :'input_string' => :'InputString',
28
+ :'model' => :'Model'
29
29
  }
30
30
  end
31
31
 
32
32
  # Attribute type mapping.
33
33
  def self.swagger_types
34
34
  {
35
- :'clean_result' => :'BOOLEAN',
36
- :'url_responses' => :'Array<PhishingUrlAdvancedResponse>'
35
+ :'input_string' => :'String',
36
+ :'model' => :'String'
37
37
  }
38
38
  end
39
39
 
@@ -45,14 +45,12 @@ module CloudmersivePhishingDetectionApiClient
45
45
  # convert string to symbol for hash key
46
46
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
47
47
 
48
- if attributes.has_key?(:'CleanResult')
49
- self.clean_result = attributes[:'CleanResult']
48
+ if attributes.has_key?(:'InputString')
49
+ self.input_string = attributes[:'InputString']
50
50
  end
51
51
 
52
- if attributes.has_key?(:'UrlResponses')
53
- if (value = attributes[:'UrlResponses']).is_a?(Array)
54
- self.url_responses = value
55
- end
52
+ if attributes.has_key?(:'Model')
53
+ self.model = attributes[:'Model']
56
54
  end
57
55
  end
58
56
 
@@ -74,8 +72,8 @@ module CloudmersivePhishingDetectionApiClient
74
72
  def ==(o)
75
73
  return true if self.equal?(o)
76
74
  self.class == o.class &&
77
- clean_result == o.clean_result &&
78
- url_responses == o.url_responses
75
+ input_string == o.input_string &&
76
+ model == o.model
79
77
  end
80
78
 
81
79
  # @see the `==` method
@@ -87,7 +85,7 @@ module CloudmersivePhishingDetectionApiClient
87
85
  # Calculates hash code according to all attributes.
88
86
  # @return [Fixnum] Hash code
89
87
  def hash
90
- [clean_result, url_responses].hash
88
+ [input_string, model].hash
91
89
  end
92
90
 
93
91
  # Builds the object from hash
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #phishingapi
3
3
 
4
- #Easily and directly scan and block phishing security threats.
4
+ #Easily and directly scan and block phishing security threats in input.
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
@@ -13,19 +13,23 @@ Swagger Codegen version: 2.4.14
13
13
  require 'date'
14
14
 
15
15
  module CloudmersivePhishingDetectionApiClient
16
- # Responses for the batch calls to Phishing Url
17
- class PhishingUrlResponseBatch
18
- # Specifies if all the urls (or its hosts or domains) in this batch call passed all the checks or not.
16
+ # Result of detecting phishing using AI
17
+ class PhishingDetectionAdvancedResponse
18
+ # True if the result is not phishing (clean), and false otherwise
19
19
  attr_accessor :clean_result
20
20
 
21
- # Dictionary where the requesting url is the key and the value is the resulting validation
22
- attr_accessor :url_responses
21
+ # Overall phishing risk level between 0.0 and 1.0
22
+ attr_accessor :phishing_risk_level
23
+
24
+ # Rationale for why the conclusion was formed
25
+ attr_accessor :analysis_rationale
23
26
 
24
27
  # Attribute mapping from ruby-style variable name to JSON key.
25
28
  def self.attribute_map
26
29
  {
27
30
  :'clean_result' => :'CleanResult',
28
- :'url_responses' => :'UrlResponses'
31
+ :'phishing_risk_level' => :'PhishingRiskLevel',
32
+ :'analysis_rationale' => :'AnalysisRationale'
29
33
  }
30
34
  end
31
35
 
@@ -33,7 +37,8 @@ module CloudmersivePhishingDetectionApiClient
33
37
  def self.swagger_types
34
38
  {
35
39
  :'clean_result' => :'BOOLEAN',
36
- :'url_responses' => :'Array<PhishingUrlResponse>'
40
+ :'phishing_risk_level' => :'Float',
41
+ :'analysis_rationale' => :'String'
37
42
  }
38
43
  end
39
44
 
@@ -49,10 +54,12 @@ module CloudmersivePhishingDetectionApiClient
49
54
  self.clean_result = attributes[:'CleanResult']
50
55
  end
51
56
 
52
- if attributes.has_key?(:'UrlResponses')
53
- if (value = attributes[:'UrlResponses']).is_a?(Array)
54
- self.url_responses = value
55
- end
57
+ if attributes.has_key?(:'PhishingRiskLevel')
58
+ self.phishing_risk_level = attributes[:'PhishingRiskLevel']
59
+ end
60
+
61
+ if attributes.has_key?(:'AnalysisRationale')
62
+ self.analysis_rationale = attributes[:'AnalysisRationale']
56
63
  end
57
64
  end
58
65
 
@@ -75,7 +82,8 @@ module CloudmersivePhishingDetectionApiClient
75
82
  return true if self.equal?(o)
76
83
  self.class == o.class &&
77
84
  clean_result == o.clean_result &&
78
- url_responses == o.url_responses
85
+ phishing_risk_level == o.phishing_risk_level &&
86
+ analysis_rationale == o.analysis_rationale
79
87
  end
80
88
 
81
89
  # @see the `==` method
@@ -87,7 +95,7 @@ module CloudmersivePhishingDetectionApiClient
87
95
  # Calculates hash code according to all attributes.
88
96
  # @return [Fixnum] Hash code
89
97
  def hash
90
- [clean_result, url_responses].hash
98
+ [clean_result, phishing_risk_level, analysis_rationale].hash
91
99
  end
92
100
 
93
101
  # Builds the object from hash
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #phishingapi
3
3
 
4
- #Easily and directly scan and block phishing security threats.
4
+ #Easily and directly scan and block phishing security threats in input.
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
@@ -13,35 +13,51 @@ Swagger Codegen version: 2.4.14
13
13
  require 'date'
14
14
 
15
15
  module CloudmersivePhishingDetectionApiClient
16
- # Response for the phishing validation apis
17
- class PhishingUrlResponse
18
- # Specifies if the url (or its host or domain) passed all the checks or not.
16
+ # Result of detecting phishing using AI
17
+ class PhishingDetectionEmailAdvancedResponse
18
+ # True if the result is not phishing (clean), and false otherwise
19
19
  attr_accessor :clean_result
20
20
 
21
- # Risk value from 0.0 - 1.0. Higher numbers are a higher risk <br />Anything below 0.3 should be considered safe. Anything above 0.7 should be considered a significant risk. <br /> A score of 1.0 indicates the url, host, or domain failed significant safety checks.<br /> If a url passes all the tests for the basic api, the risk will be 0.7. If a url passes all the tests for the advanced api, the risk will be 0.2.
22
- attr_accessor :risk
21
+ # Overall phishing risk level between 0.0 and 1.0
22
+ attr_accessor :phishing_risk_level
23
23
 
24
- # Specifies if the full url with query parameters and fragment is a phishing threat <br />The advanced api performs more checks on the full url.
25
- attr_accessor :contains_threat_url
24
+ # Overall phishing spam level between 0.0 and 1.0
25
+ attr_accessor :spam_risk_level
26
26
 
27
- # Specifies if the host of the url (i.e. ```mysite.hostingsite.com``` for a url of ```https://mysite.hostingsite.com/index.html```) is a phishing threat <br />The advanced api performs more checks on the host
28
- attr_accessor :contains_threat_host
27
+ # True if the input email is from a low reputation sender
28
+ attr_accessor :contains_low_reputation_sender
29
29
 
30
- # Specifies if the registerable domain of the url (i.e. ```hostingsite.com``` for a url of ```https://mysite.hostingsite.com/index.html```) is a phishing threat <br />The advanced api performs more checks on the domain
31
- attr_accessor :contains_threat_domain
30
+ # True if the input email contains phishing threat risks, false otherwise
31
+ attr_accessor :contains_phishing
32
32
 
33
- # Input URL that was scanned
34
- attr_accessor :input_url
33
+ # True if the email contains phishing threat risks, false otherwise
34
+ attr_accessor :contains_spam
35
+
36
+ # True if the input email contains unsolicited sales, false otherwise
37
+ attr_accessor :contains_unsolicited_sales
38
+
39
+ # True if the input email contains promotional content, false otherwise
40
+ attr_accessor :contains_promotional_content
41
+
42
+ # True if the input email contains a phishing attempt, false otherwise
43
+ attr_accessor :contains_phishing_attempt
44
+
45
+ # Rationale for why the conclusion was formed
46
+ attr_accessor :analysis_rationale
35
47
 
36
48
  # Attribute mapping from ruby-style variable name to JSON key.
37
49
  def self.attribute_map
38
50
  {
39
51
  :'clean_result' => :'CleanResult',
40
- :'risk' => :'Risk',
41
- :'contains_threat_url' => :'ContainsThreatUrl',
42
- :'contains_threat_host' => :'ContainsThreatHost',
43
- :'contains_threat_domain' => :'ContainsThreatDomain',
44
- :'input_url' => :'InputUrl'
52
+ :'phishing_risk_level' => :'PhishingRiskLevel',
53
+ :'spam_risk_level' => :'SpamRiskLevel',
54
+ :'contains_low_reputation_sender' => :'ContainsLowReputationSender',
55
+ :'contains_phishing' => :'ContainsPhishing',
56
+ :'contains_spam' => :'ContainsSpam',
57
+ :'contains_unsolicited_sales' => :'ContainsUnsolicitedSales',
58
+ :'contains_promotional_content' => :'ContainsPromotionalContent',
59
+ :'contains_phishing_attempt' => :'ContainsPhishingAttempt',
60
+ :'analysis_rationale' => :'AnalysisRationale'
45
61
  }
46
62
  end
47
63
 
@@ -49,11 +65,15 @@ module CloudmersivePhishingDetectionApiClient
49
65
  def self.swagger_types
50
66
  {
51
67
  :'clean_result' => :'BOOLEAN',
52
- :'risk' => :'Float',
53
- :'contains_threat_url' => :'BOOLEAN',
54
- :'contains_threat_host' => :'BOOLEAN',
55
- :'contains_threat_domain' => :'BOOLEAN',
56
- :'input_url' => :'String'
68
+ :'phishing_risk_level' => :'Float',
69
+ :'spam_risk_level' => :'Float',
70
+ :'contains_low_reputation_sender' => :'BOOLEAN',
71
+ :'contains_phishing' => :'BOOLEAN',
72
+ :'contains_spam' => :'BOOLEAN',
73
+ :'contains_unsolicited_sales' => :'BOOLEAN',
74
+ :'contains_promotional_content' => :'BOOLEAN',
75
+ :'contains_phishing_attempt' => :'BOOLEAN',
76
+ :'analysis_rationale' => :'String'
57
77
  }
58
78
  end
59
79
 
@@ -69,24 +89,40 @@ module CloudmersivePhishingDetectionApiClient
69
89
  self.clean_result = attributes[:'CleanResult']
70
90
  end
71
91
 
72
- if attributes.has_key?(:'Risk')
73
- self.risk = attributes[:'Risk']
92
+ if attributes.has_key?(:'PhishingRiskLevel')
93
+ self.phishing_risk_level = attributes[:'PhishingRiskLevel']
94
+ end
95
+
96
+ if attributes.has_key?(:'SpamRiskLevel')
97
+ self.spam_risk_level = attributes[:'SpamRiskLevel']
98
+ end
99
+
100
+ if attributes.has_key?(:'ContainsLowReputationSender')
101
+ self.contains_low_reputation_sender = attributes[:'ContainsLowReputationSender']
102
+ end
103
+
104
+ if attributes.has_key?(:'ContainsPhishing')
105
+ self.contains_phishing = attributes[:'ContainsPhishing']
106
+ end
107
+
108
+ if attributes.has_key?(:'ContainsSpam')
109
+ self.contains_spam = attributes[:'ContainsSpam']
74
110
  end
75
111
 
76
- if attributes.has_key?(:'ContainsThreatUrl')
77
- self.contains_threat_url = attributes[:'ContainsThreatUrl']
112
+ if attributes.has_key?(:'ContainsUnsolicitedSales')
113
+ self.contains_unsolicited_sales = attributes[:'ContainsUnsolicitedSales']
78
114
  end
79
115
 
80
- if attributes.has_key?(:'ContainsThreatHost')
81
- self.contains_threat_host = attributes[:'ContainsThreatHost']
116
+ if attributes.has_key?(:'ContainsPromotionalContent')
117
+ self.contains_promotional_content = attributes[:'ContainsPromotionalContent']
82
118
  end
83
119
 
84
- if attributes.has_key?(:'ContainsThreatDomain')
85
- self.contains_threat_domain = attributes[:'ContainsThreatDomain']
120
+ if attributes.has_key?(:'ContainsPhishingAttempt')
121
+ self.contains_phishing_attempt = attributes[:'ContainsPhishingAttempt']
86
122
  end
87
123
 
88
- if attributes.has_key?(:'InputUrl')
89
- self.input_url = attributes[:'InputUrl']
124
+ if attributes.has_key?(:'AnalysisRationale')
125
+ self.analysis_rationale = attributes[:'AnalysisRationale']
90
126
  end
91
127
  end
92
128
 
@@ -109,11 +145,15 @@ module CloudmersivePhishingDetectionApiClient
109
145
  return true if self.equal?(o)
110
146
  self.class == o.class &&
111
147
  clean_result == o.clean_result &&
112
- risk == o.risk &&
113
- contains_threat_url == o.contains_threat_url &&
114
- contains_threat_host == o.contains_threat_host &&
115
- contains_threat_domain == o.contains_threat_domain &&
116
- input_url == o.input_url
148
+ phishing_risk_level == o.phishing_risk_level &&
149
+ spam_risk_level == o.spam_risk_level &&
150
+ contains_low_reputation_sender == o.contains_low_reputation_sender &&
151
+ contains_phishing == o.contains_phishing &&
152
+ contains_spam == o.contains_spam &&
153
+ contains_unsolicited_sales == o.contains_unsolicited_sales &&
154
+ contains_promotional_content == o.contains_promotional_content &&
155
+ contains_phishing_attempt == o.contains_phishing_attempt &&
156
+ analysis_rationale == o.analysis_rationale
117
157
  end
118
158
 
119
159
  # @see the `==` method
@@ -125,7 +165,7 @@ module CloudmersivePhishingDetectionApiClient
125
165
  # Calculates hash code according to all attributes.
126
166
  # @return [Fixnum] Hash code
127
167
  def hash
128
- [clean_result, risk, contains_threat_url, contains_threat_host, contains_threat_domain, input_url].hash
168
+ [clean_result, phishing_risk_level, spam_risk_level, contains_low_reputation_sender, contains_phishing, contains_spam, contains_unsolicited_sales, contains_promotional_content, contains_phishing_attempt, analysis_rationale].hash
129
169
  end
130
170
 
131
171
  # Builds the object from hash
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #phishingapi
3
3
 
4
- #Easily and directly scan and block phishing security threats.
4
+ #Easily and directly scan and block phishing security threats in input.
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
@@ -13,22 +13,22 @@ Swagger Codegen version: 2.4.14
13
13
  require 'date'
14
14
 
15
15
  module CloudmersivePhishingDetectionApiClient
16
- # Request data for the basic phishing validation apis
17
- class PhishingUrlRequest
18
- # Full url to be evaluated
19
- attr_accessor :url
16
+ # Result of detecting phishing using AI
17
+ class PhishingDetectionResponse
18
+ # True if the result is not phishing (clean), and false otherwise
19
+ attr_accessor :clean_result
20
20
 
21
21
  # Attribute mapping from ruby-style variable name to JSON key.
22
22
  def self.attribute_map
23
23
  {
24
- :'url' => :'Url'
24
+ :'clean_result' => :'CleanResult'
25
25
  }
26
26
  end
27
27
 
28
28
  # Attribute type mapping.
29
29
  def self.swagger_types
30
30
  {
31
- :'url' => :'String'
31
+ :'clean_result' => :'BOOLEAN'
32
32
  }
33
33
  end
34
34
 
@@ -40,8 +40,8 @@ module CloudmersivePhishingDetectionApiClient
40
40
  # convert string to symbol for hash key
41
41
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
42
42
 
43
- if attributes.has_key?(:'Url')
44
- self.url = attributes[:'Url']
43
+ if attributes.has_key?(:'CleanResult')
44
+ self.clean_result = attributes[:'CleanResult']
45
45
  end
46
46
  end
47
47
 
@@ -49,17 +49,12 @@ module CloudmersivePhishingDetectionApiClient
49
49
  # @return Array for valid properties with the reasons
50
50
  def list_invalid_properties
51
51
  invalid_properties = Array.new
52
- if @url.nil?
53
- invalid_properties.push('invalid value for "url", url cannot be nil.')
54
- end
55
-
56
52
  invalid_properties
57
53
  end
58
54
 
59
55
  # Check to see if the all the properties in the model are valid
60
56
  # @return true if the model is valid
61
57
  def valid?
62
- return false if @url.nil?
63
58
  true
64
59
  end
65
60
 
@@ -68,7 +63,7 @@ module CloudmersivePhishingDetectionApiClient
68
63
  def ==(o)
69
64
  return true if self.equal?(o)
70
65
  self.class == o.class &&
71
- url == o.url
66
+ clean_result == o.clean_result
72
67
  end
73
68
 
74
69
  # @see the `==` method
@@ -80,7 +75,7 @@ module CloudmersivePhishingDetectionApiClient
80
75
  # Calculates hash code according to all attributes.
81
76
  # @return [Fixnum] Hash code
82
77
  def hash
83
- [url].hash
78
+ [clean_result].hash
84
79
  end
85
80
 
86
81
  # Builds the object from hash
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #phishingapi
3
3
 
4
- #Easily and directly scan and block phishing security threats.
4
+ #Easily and directly scan and block phishing security threats in input.
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.14
11
11
  =end
12
12
 
13
13
  module CloudmersivePhishingDetectionApiClient
14
- VERSION = '2.2.0'
14
+ VERSION = '2.2.1'
15
15
  end