Class: Google::Apis::DriveV3::TeamDrive::BackgroundImageFile

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

Overview

The background image file for a Team Drive.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ BackgroundImageFile

Returns a new instance of BackgroundImageFile.



4439
4440
4441
# File 'lib/google/apis/drive_v3/classes.rb', line 4439

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

Instance Attribute Details

#idString

The ID of an image file in Drive to use for the background image. Corresponds to the JSON property id

Returns:

  • (String)


4412
4413
4414
# File 'lib/google/apis/drive_v3/classes.rb', line 4412

def id
  @id
end

#widthFloat

The width of the cropped image in the closed range of 0 to 1. This value represents the width of the cropped image divided by the width of the entire image. The height is computed by applying a width to height aspect ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and 144 pixels high. Corresponds to the JSON property width

Returns:

  • (Float)


4421
4422
4423
# File 'lib/google/apis/drive_v3/classes.rb', line 4421

def width
  @width
end

#x_coordinateFloat

The X coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image. Corresponds to the JSON property xCoordinate

Returns:

  • (Float)


4429
4430
4431
# File 'lib/google/apis/drive_v3/classes.rb', line 4429

def x_coordinate
  @x_coordinate
end

#y_coordinateFloat

The Y coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image. Corresponds to the JSON property yCoordinate

Returns:

  • (Float)


4437
4438
4439
# File 'lib/google/apis/drive_v3/classes.rb', line 4437

def y_coordinate
  @y_coordinate
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4444
4445
4446
4447
4448
4449
# File 'lib/google/apis/drive_v3/classes.rb', line 4444

def update!(**args)
  @id = args[:id] if args.key?(:id)
  @width = args[:width] if args.key?(:width)
  @x_coordinate = args[:x_coordinate] if args.key?(:x_coordinate)
  @y_coordinate = args[:y_coordinate] if args.key?(:y_coordinate)
end