Class: Copyleaks::SubmissionProperties
- Inherits:
-
Object
- Object
- Copyleaks::SubmissionProperties
- Defined in:
- lib/copyleaks/models/submissions/properties/submission_properties.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#aiGeneratedText ⇒ Object
readonly
Returns the value of attribute aiGeneratedText.
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#cheatDetection ⇒ Object
readonly
Returns the value of attribute cheatDetection.
-
#customMetadata ⇒ Object
readonly
Returns the value of attribute customMetadata.
-
#developerPayload ⇒ Object
readonly
Returns the value of attribute developerPayload.
-
#exclude ⇒ Object
readonly
Returns the value of attribute exclude.
-
#expiration ⇒ Object
readonly
Returns the value of attribute expiration.
-
#filters ⇒ Object
readonly
Returns the value of attribute filters.
-
#includeHtml ⇒ Object
readonly
Returns the value of attribute includeHtml.
-
#indexing ⇒ Object
readonly
Returns the value of attribute indexing.
-
#pdf ⇒ Object
readonly
Returns the value of attribute pdf.
-
#sandbox ⇒ Object
readonly
Returns the value of attribute sandbox.
-
#scanMethodAlgorithm ⇒ Object
readonly
Returns the value of attribute scanMethodAlgorithm.
-
#scanning ⇒ Object
readonly
Returns the value of attribute scanning.
-
#sensitiveDataProtection ⇒ Object
readonly
Returns the value of attribute sensitiveDataProtection.
-
#sensitivityLevel ⇒ Object
readonly
Returns the value of attribute sensitivityLevel.
-
#webhooks ⇒ Object
readonly
Returns the value of attribute webhooks.
Instance Method Summary collapse
- #as_json(*_args) ⇒ Object
-
#initialize(webhooks, includeHtml = nil, developerPayload = nil, sandbox = nil, expiration = nil, sensitivityLevel = nil, cheatDetection = nil, action = nil, author = nil, filters = nil, scanning = nil, indexing = nil, exclude = nil, pdf = nil, sensitiveDataProtection = nil, scanMethodAlgorithm = nil, aiGeneratedText = nil, customMetadata = nil) ⇒ SubmissionProperties
constructor
A new instance of SubmissionProperties.
- #to_json(*options) ⇒ Object
Constructor Details
#initialize(webhooks, includeHtml = nil, developerPayload = nil, sandbox = nil, expiration = nil, sensitivityLevel = nil, cheatDetection = nil, action = nil, author = nil, filters = nil, scanning = nil, indexing = nil, exclude = nil, pdf = nil, sensitiveDataProtection = nil, scanMethodAlgorithm = nil, aiGeneratedText = nil, customMetadata = nil) ⇒ SubmissionProperties
Returns a new instance of SubmissionProperties.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 48 def initialize( webhooks, includeHtml = nil, developerPayload = nil, sandbox = nil, expiration = nil, sensitivityLevel = nil, cheatDetection = nil, action = nil, = nil, filters = nil, scanning = nil, indexing = nil, exclude = nil, pdf = nil, sensitiveDataProtection = nil, scanMethodAlgorithm = nil, aiGeneratedText = nil, customMetadata = nil ) unless webhooks.instance_of?(SubmissionWebhooks) raise 'Copyleaks::SubmissionProperties - webhooks - webhooks must be of type SubmissionWebhooks' end if !includeHtml.nil? && ![true, false].include?(includeHtml) raise 'Copyleaks::SubmissionProperties - includeHtml - includeHtml must be of type Boolean' end unless developerPayload.instance_of?(String) raise 'Copyleaks::SubmissionProperties - developerPayload - developerPayload must be of type String' end if !sandbox.nil? && ![true, false].include?(sandbox) raise 'Copyleaks::SubmissionProperties - sandbox - includeHtml must be of type Boolean' end unless expiration.instance_of?(Integer) raise 'Copyleaks::SubmissionProperties - expiration - expiration must be of type Integer' end unless sensitivityLevel.instance_of?(Integer) raise 'Copyleaks::SubmissionProperties - sensitivityLevel - sensitivityLevel must be of type Integer' end if !cheatDetection.nil? && ![true, false].include?(cheatDetection) raise 'Copyleaks::SubmissionProperties - cheatDetection - cheatDetection must be of type Boolean' end if !action.nil? && ![0, 1, 2].include?(action) raise 'Copyleaks::SubmissionProperties - action - action must be of type SubmissionActions consts' end if !.nil? && !.instance_of?(SubmissionAuthor) raise 'Copyleaks::SubmissionProperties - author - author must be of type SubmissionAuthor' end if !filters.nil? && !filters.instance_of?(SubmissionFilter) raise 'Copyleaks::SubmissionProperties - filters - filters must be of type SubmissionFilter' end if !scanning.nil? && !scanning.instance_of?(SubmissionScanning) raise 'Copyleaks::SubmissionProperties - scanning - scanning must be of type SubmissionScanning' end if !indexing.nil? && !indexing.instance_of?(SubmissionIndexing) raise 'Copyleaks::SubmissionProperties - indexing - indexing must be of type SubmissionIndexing' end if !exclude.nil? && !exclude.instance_of?(SubmissionExclude) raise 'Copyleaks::SubmissionProperties - exclude - exclude must be of type SubmissionExclude' end if !pdf.nil? && !pdf.instance_of?(SubmissionPDF) raise 'Copyleaks::SubmissionProperties - pdf - pdf must be of type SubmissionPDF' end if !sensitiveDataProtection.nil? && !sensitiveDataProtection.instance_of?(SubmissionSensitiveData) raise 'Copyleaks::SubmissionProperties - sensitiveDataProtection - sensitiveDataProtection must be of type SubmissionSensitiveData' end if !scanMethodAlgorithm.nil? && ![0, 1].include?(scanMethodAlgorithm) raise 'Copyleaks::SubmissionProperties - scanMethodAlgorithm - scanMethodAlgorithm must be of type SubmissionScanMethodAlgorithm' end if !aiGeneratedText.nil? && !aiGeneratedText.instance_of?(SubmissionAiGeneratedText) raise 'Copyleaks::SubmissionProperties - aiGeneratedText - aiGeneratedText must be of type SubmissionAiGeneratedText' end if !customMetadata.nil? && !(customMetadata.is_a?(Array) && customMetadata.all? { |element| element.is_a?(SubmissionCustomMetadata) }) raise 'Copyleaks::SubmissionProperties - customMetadata - customMetadata must be of type SubmissionCustomMetadata[]' end @webhooks = webhooks @includeHtml = includeHtml @developerPayload = developerPayload @sandbox = sandbox @expiration = expiration @sensitivityLevel = sensitivityLevel @cheatDetection = cheatDetection @aiGeneratedText = aiGeneratedText @action = action @author = @filters = filters @scanning = scanning @indexing = indexing @exclude = exclude @pdf = pdf @sensitiveDataProtection = sensitiveDataProtection @scanMethodAlgorithm = scanMethodAlgorithm @customMetadata = customMetadata end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
26 27 28 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 26 def action @action end |
#aiGeneratedText ⇒ Object (readonly)
Returns the value of attribute aiGeneratedText.
26 27 28 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 26 def aiGeneratedText @aiGeneratedText end |
#author ⇒ Object (readonly)
Returns the value of attribute author.
26 27 28 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 26 def @author end |
#cheatDetection ⇒ Object (readonly)
Returns the value of attribute cheatDetection.
26 27 28 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 26 def cheatDetection @cheatDetection end |
#customMetadata ⇒ Object (readonly)
Returns the value of attribute customMetadata.
26 27 28 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 26 def customMetadata @customMetadata end |
#developerPayload ⇒ Object (readonly)
Returns the value of attribute developerPayload.
26 27 28 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 26 def developerPayload @developerPayload end |
#exclude ⇒ Object (readonly)
Returns the value of attribute exclude.
26 27 28 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 26 def exclude @exclude end |
#expiration ⇒ Object (readonly)
Returns the value of attribute expiration.
26 27 28 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 26 def expiration @expiration end |
#filters ⇒ Object (readonly)
Returns the value of attribute filters.
26 27 28 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 26 def filters @filters end |
#includeHtml ⇒ Object (readonly)
Returns the value of attribute includeHtml.
26 27 28 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 26 def includeHtml @includeHtml end |
#indexing ⇒ Object (readonly)
Returns the value of attribute indexing.
26 27 28 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 26 def indexing @indexing end |
#pdf ⇒ Object (readonly)
Returns the value of attribute pdf.
26 27 28 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 26 def pdf @pdf end |
#sandbox ⇒ Object (readonly)
Returns the value of attribute sandbox.
26 27 28 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 26 def sandbox @sandbox end |
#scanMethodAlgorithm ⇒ Object (readonly)
Returns the value of attribute scanMethodAlgorithm.
26 27 28 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 26 def scanMethodAlgorithm @scanMethodAlgorithm end |
#scanning ⇒ Object (readonly)
Returns the value of attribute scanning.
26 27 28 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 26 def scanning @scanning end |
#sensitiveDataProtection ⇒ Object (readonly)
Returns the value of attribute sensitiveDataProtection.
26 27 28 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 26 def sensitiveDataProtection @sensitiveDataProtection end |
#sensitivityLevel ⇒ Object (readonly)
Returns the value of attribute sensitivityLevel.
26 27 28 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 26 def sensitivityLevel @sensitivityLevel end |
#webhooks ⇒ Object (readonly)
Returns the value of attribute webhooks.
26 27 28 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 26 def webhooks @webhooks end |
Instance Method Details
#as_json(*_args) ⇒ Object
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 129 def as_json(*_args) { webhooks: @webhooks, includeHtml: @includeHtml, developerPayload: @developerPayload, sandbox: @sandbox, expiration: @expiration, sensitivityLevel: @sensitivityLevel, cheatDetection: @cheatDetection, aiGeneratedText: @aiGeneratedText, action: @action, author: @author, filters: @filters, scanning: @scanning, indexing: @indexing, exclude: @exclude, pdf: @pdf, sensitiveDataProtection: @sensitiveDataProtection, scanMethodAlgorithm: @scanMethodAlgorithm, customMetadata: @customMetadata }.select { |_k, v| !v.nil? } end |
#to_json(*options) ⇒ Object
152 153 154 |
# File 'lib/copyleaks/models/submissions/properties/submission_properties.rb', line 152 def to_json(*) as_json(*).to_json(*) end |