Class: Google::Apis::DlpV2::GooglePrivacyDlpV2Color

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

Represents a color in the RGB color space.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GooglePrivacyDlpV2Color

Returns a new instance of GooglePrivacyDlpV2Color.



1231
1232
1233
# File 'lib/google/apis/dlp_v2/classes.rb', line 1231

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

Instance Attribute Details

#blueFloat

The amount of blue in the color as a value in the interval [0, 1]. Corresponds to the JSON property blue

Returns:

  • (Float)


1219
1220
1221
# File 'lib/google/apis/dlp_v2/classes.rb', line 1219

def blue
  @blue
end

#greenFloat

The amount of green in the color as a value in the interval [0, 1]. Corresponds to the JSON property green

Returns:

  • (Float)


1224
1225
1226
# File 'lib/google/apis/dlp_v2/classes.rb', line 1224

def green
  @green
end

#redFloat

The amount of red in the color as a value in the interval [0, 1]. Corresponds to the JSON property red

Returns:

  • (Float)


1229
1230
1231
# File 'lib/google/apis/dlp_v2/classes.rb', line 1229

def red
  @red
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1236
1237
1238
1239
1240
# File 'lib/google/apis/dlp_v2/classes.rb', line 1236

def update!(**args)
  @blue = args[:blue] if args.key?(:blue)
  @green = args[:green] if args.key?(:green)
  @red = args[:red] if args.key?(:red)
end