Class: Google::Apis::DlpV2::GooglePrivacyDlpV2ContentPolicy

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dlp_v2/classes.rb,
lib/google/apis/dlp_v2/representations.rb,
lib/google/apis/dlp_v2/representations.rb

Overview

A policy to apply to content based on its inspection findings.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GooglePrivacyDlpV2ContentPolicy

Returns a new instance of GooglePrivacyDlpV2ContentPolicy.



2221
2222
2223
# File 'lib/google/apis/dlp_v2/classes.rb', line 2221

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#create_timeString

Output only. The creation timestamp of a contentPolicy; output-only field. Corresponds to the JSON property createTime

Returns:

  • (String)


2152
2153
2154
# File 'lib/google/apis/dlp_v2/classes.rb', line 2152

def create_time
  @create_time
end

#default_actionGoogle::Apis::DlpV2::GooglePrivacyDlpV2PolicyAction

A possible action to take when applying a content policy. Corresponds to the JSON property defaultAction



2157
2158
2159
# File 'lib/google/apis/dlp_v2/classes.rb', line 2157

def default_action
  @default_action
end

#display_nameString

Optional. Display name (max 63 chars) Corresponds to the JSON property displayName

Returns:

  • (String)


2162
2163
2164
# File 'lib/google/apis/dlp_v2/classes.rb', line 2162

def display_name
  @display_name
end

#errorsArray<Google::Apis::DlpV2::GooglePrivacyDlpV2Error>

Output only. A stream of errors encountered when the policy was applied. Output only field. Will return the last 100 errors. Whenever the policy is modified this list will be cleared. Corresponds to the JSON property errors



2169
2170
2171
# File 'lib/google/apis/dlp_v2/classes.rb', line 2169

def errors
  @errors
end

#failed_to_scan_supported_file_typeGoogle::Apis::DlpV2::GooglePrivacyDlpV2PolicyAction

A possible action to take when applying a content policy. Corresponds to the JSON property failedToScanSupportedFileType



2174
2175
2176
# File 'lib/google/apis/dlp_v2/classes.rb', line 2174

def failed_to_scan_supported_file_type
  @failed_to_scan_supported_file_type
end

#input_too_largeGoogle::Apis::DlpV2::GooglePrivacyDlpV2PolicyAction

A possible action to take when applying a content policy. Corresponds to the JSON property inputTooLarge



2179
2180
2181
# File 'lib/google/apis/dlp_v2/classes.rb', line 2179

def input_too_large
  @input_too_large
end

#inspect_configGoogle::Apis::DlpV2::GooglePrivacyDlpV2InspectConfig

Configuration description of the scanning process. When used with redactContent only info_types and min_likelihood are currently used. Corresponds to the JSON property inspectConfig



2185
2186
2187
# File 'lib/google/apis/dlp_v2/classes.rb', line 2185

def inspect_config
  @inspect_config
end

#inspect_templateGoogle::Apis::DlpV2::GooglePrivacyDlpV2InspectTemplate

The inspectTemplate contains a configuration (set of types of sensitive data to be detected) to be used anywhere you otherwise would normally specify InspectConfig. See https://docs.cloud.google.com/sensitive-data-protection/ docs/concepts-templates to learn more. Corresponds to the JSON property inspectTemplate



2193
2194
2195
# File 'lib/google/apis/dlp_v2/classes.rb', line 2193

def inspect_template
  @inspect_template
end

#logging_configsArray<Google::Apis::DlpV2::GooglePrivacyDlpV2LoggingConfig>

Optional. Log the actions taken by the content policy to external systems. Corresponds to the JSON property loggingConfigs



2198
2199
2200
# File 'lib/google/apis/dlp_v2/classes.rb', line 2198

def logging_configs
  @logging_configs
end

#nameString

Output only. Resource name of the policy. Corresponds to the JSON property name

Returns:

  • (String)


2203
2204
2205
# File 'lib/google/apis/dlp_v2/classes.rb', line 2203

def name
  @name
end

#rulesArray<Google::Apis::DlpV2::GooglePrivacyDlpV2PolicyRule>

Required. Policies to apply, based on the findings returned by inspection. The first rule to match applies. Corresponds to the JSON property rules



2209
2210
2211
# File 'lib/google/apis/dlp_v2/classes.rb', line 2209

def rules
  @rules
end

#unsupported_file_typeGoogle::Apis::DlpV2::GooglePrivacyDlpV2PolicyAction

A possible action to take when applying a content policy. Corresponds to the JSON property unsupportedFileType



2214
2215
2216
# File 'lib/google/apis/dlp_v2/classes.rb', line 2214

def unsupported_file_type
  @unsupported_file_type
end

#update_timeString

Output only. The last update timestamp of a contentPolicy; output-only field. Corresponds to the JSON property updateTime

Returns:

  • (String)


2219
2220
2221
# File 'lib/google/apis/dlp_v2/classes.rb', line 2219

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
# File 'lib/google/apis/dlp_v2/classes.rb', line 2226

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @default_action = args[:default_action] if args.key?(:default_action)
  @display_name = args[:display_name] if args.key?(:display_name)
  @errors = args[:errors] if args.key?(:errors)
  @failed_to_scan_supported_file_type = args[:failed_to_scan_supported_file_type] if args.key?(:failed_to_scan_supported_file_type)
  @input_too_large = args[:input_too_large] if args.key?(:input_too_large)
  @inspect_config = args[:inspect_config] if args.key?(:inspect_config)
  @inspect_template = args[:inspect_template] if args.key?(:inspect_template)
  @logging_configs = args[:logging_configs] if args.key?(:logging_configs)
  @name = args[:name] if args.key?(:name)
  @rules = args[:rules] if args.key?(:rules)
  @unsupported_file_type = args[:unsupported_file_type] if args.key?(:unsupported_file_type)
  @update_time = args[:update_time] if args.key?(:update_time)
end