Class: ContextDev::Models::WebWebScrapeImagesParams::Enrichment

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/context_dev/models/web_web_scrape_images_params.rb,
sig/context_dev/models/web_web_scrape_images_params.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(classification: nil, hosted_url: nil, max_time_per_ms: nil, resolution: nil) ⇒ Object

Some parameter documentations has been truncated, see ContextDev::Models::WebWebScrapeImagesParams::Enrichment for more details.

Optional per-image processing, sent as deep-object query params such as enrichment=true.

Parameters:

  • classification (Boolean) (defaults to: nil)

    Classify each image by visual asset type.

  • hosted_url (Boolean) (defaults to: nil)

    Host materializable images on the Brand.dev CDN and return their URL and MIME ty

  • max_time_per_ms (Integer) (defaults to: nil)

    Per-image enrichment timeout in milliseconds. Default: 30000. Maximum: 60000.

  • resolution (Boolean) (defaults to: nil)

    Measure image width and height when possible.



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 82

class Enrichment < ContextDev::Internal::Type::BaseModel
  # @!attribute classification
  #   Classify each image by visual asset type.
  #
  #   @return [Boolean, nil]
  optional :classification, ContextDev::Internal::Type::Boolean

  # @!attribute hosted_url
  #   Host materializable images on the Brand.dev CDN and return their URL and MIME
  #   type.
  #
  #   @return [Boolean, nil]
  optional :hosted_url, ContextDev::Internal::Type::Boolean, api_name: :hostedUrl

  # @!attribute max_time_per_ms
  #   Per-image enrichment timeout in milliseconds. Default: 30000. Maximum: 60000.
  #
  #   @return [Integer, nil]
  optional :max_time_per_ms, Integer, api_name: :maxTimePerMs

  # @!attribute resolution
  #   Measure image width and height when possible.
  #
  #   @return [Boolean, nil]
  optional :resolution, ContextDev::Internal::Type::Boolean

  # @!method initialize(classification: nil, hosted_url: nil, max_time_per_ms: nil, resolution: nil)
  #   Some parameter documentations has been truncated, see
  #   {ContextDev::Models::WebWebScrapeImagesParams::Enrichment} for more details.
  #
  #   Optional per-image processing, sent as deep-object query params such as
  #   enrichment[resolution]=true.
  #
  #   @param classification [Boolean] Classify each image by visual asset type.
  #
  #   @param hosted_url [Boolean] Host materializable images on the Brand.dev CDN and return their URL and MIME ty
  #
  #   @param max_time_per_ms [Integer] Per-image enrichment timeout in milliseconds. Default: 30000. Maximum: 60000.
  #
  #   @param resolution [Boolean] Measure image width and height when possible.
end

Instance Attribute Details

#classificationBoolean?

Classify each image by visual asset type.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


87
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 87

optional :classification, ContextDev::Internal::Type::Boolean

#hosted_urlBoolean?

Host materializable images on the Brand.dev CDN and return their URL and MIME type.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


94
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 94

optional :hosted_url, ContextDev::Internal::Type::Boolean, api_name: :hostedUrl

#max_time_per_msInteger?

Per-image enrichment timeout in milliseconds. Default: 30000. Maximum: 60000.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


100
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 100

optional :max_time_per_ms, Integer, api_name: :maxTimePerMs

#resolutionBoolean?

Measure image width and height when possible.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


106
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 106

optional :resolution, ContextDev::Internal::Type::Boolean

Instance Method Details

#to_hash{

Returns:

  • ({)


101
# File 'sig/context_dev/models/web_web_scrape_images_params.rbs', line 101

def to_hash: -> {