Class: Google::Apis::SlidesV1::ReplaceAllShapesWithImageRequest

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

Overview

Replaces all shapes that match the given criteria with the provided image. The images replacing the shapes are rectangular after being inserted into the presentation and do not take on the forms of the shapes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ReplaceAllShapesWithImageRequest

Returns a new instance of ReplaceAllShapesWithImageRequest.



2620
2621
2622
# File 'lib/google/apis/slides_v1/classes.rb', line 2620

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

Instance Attribute Details

#contains_textGoogle::Apis::SlidesV1::SubstringMatchCriteria

A criteria that matches a specific string of text in a shape or table. Corresponds to the JSON property containsText



2585
2586
2587
# File 'lib/google/apis/slides_v1/classes.rb', line 2585

def contains_text
  @contains_text
end

#image_replace_methodString

The image replace method. If you specify both a replace_method and an image_replace_method, the image_replace_method takes precedence. If you do not specify a value for image_replace_method, but specify a value for replace_method, then the specified replace_method value is used. If you do not specify either, then CENTER_INSIDE is used. Corresponds to the JSON property imageReplaceMethod

Returns:

  • (String)


2594
2595
2596
# File 'lib/google/apis/slides_v1/classes.rb', line 2594

def image_replace_method
  @image_replace_method
end

#image_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 imageUrl

Returns:

  • (String)


2603
2604
2605
# File 'lib/google/apis/slides_v1/classes.rb', line 2603

def image_url
  @image_url
end

#page_object_idsArray<String>

If non-empty, limits the matches to page elements only on the given pages. Returns a 400 bad request error if given the page object ID of a notes page or a notes master, or if a page with that object ID doesn't exist in the presentation. Corresponds to the JSON property pageObjectIds

Returns:

  • (Array<String>)


2611
2612
2613
# File 'lib/google/apis/slides_v1/classes.rb', line 2611

def page_object_ids
  @page_object_ids
end

#replace_methodString

The replace method. Deprecated: use image_replace_method instead. If you specify both a replace_method and an image_replace_method, the image_replace_method takes precedence. Corresponds to the JSON property replaceMethod

Returns:

  • (String)


2618
2619
2620
# File 'lib/google/apis/slides_v1/classes.rb', line 2618

def replace_method
  @replace_method
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2625
2626
2627
2628
2629
2630
2631
# File 'lib/google/apis/slides_v1/classes.rb', line 2625

def update!(**args)
  @contains_text = args[:contains_text] if args.key?(:contains_text)
  @image_replace_method = args[:image_replace_method] if args.key?(:image_replace_method)
  @image_url = args[:image_url] if args.key?(:image_url)
  @page_object_ids = args[:page_object_ids] if args.key?(:page_object_ids)
  @replace_method = args[:replace_method] if args.key?(:replace_method)
end