Class: Google::Apis::SlidesV1::CreateImageRequest

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

Overview

Creates an image.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ CreateImageRequest

Returns a new instance of CreateImageRequest.



329
330
331
# File 'generated/google/apis/slides_v1/classes.rb', line 329

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

Instance Attribute Details

#element_propertiesGoogle::Apis::SlidesV1::PageElementProperties

Common properties for a page element. Note: When you initially create a PageElement, the API may modify the values of both size and transform, but the visual size will be unchanged. Corresponds to the JSON property elementProperties



304
305
306
# File 'generated/google/apis/slides_v1/classes.rb', line 304

def element_properties
  @element_properties
end

#object_id_propString

A user-supplied object ID. If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex [a-zA-Z0-9_]); remaining characters may include those as well as a hyphen or colon (matches regex [a-zA-Z0-9_-:]). The length of the ID must not be less than 5 or greater than 50. If you don't specify an ID, a unique one is generated. Corresponds to the JSON property objectId

Returns:

  • (String)


316
317
318
# File 'generated/google/apis/slides_v1/classes.rb', line 316

def object_id_prop
  @object_id_prop
end

#urlString

The image URL. The image is fetched once at insertion time and a copy is stored for display inside the presentation. Images must be less than 50MB in size, cannot exceed 25 megapixels, and must be in one of PNG, JPEG, or GIF format. The provided URL can be at most 2 kB in length. The URL itself is saved with the image, and exposed via the Image.source_url field. Corresponds to the JSON property url

Returns:

  • (String)


327
328
329
# File 'generated/google/apis/slides_v1/classes.rb', line 327

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



334
335
336
337
338
# File 'generated/google/apis/slides_v1/classes.rb', line 334

def update!(**args)
  @element_properties = args[:element_properties] if args.key?(:element_properties)
  @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop)
  @url = args[:url] if args.key?(:url)
end