Class: Google::Apis::PolyV1::Asset

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

Overview

Represents and describes an asset in the Poly library. An asset is a 3D model or scene created using Tilt Brush, Blocks, or any 3D program that produces a file that can be upload to Poly.

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) ⇒ Asset

Returns a new instance of Asset



116
117
118
# File 'generated/google/apis/poly_v1/classes.rb', line 116

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

Instance Attribute Details

#author_nameString

The author's publicly visible name. Use this name when giving credit to the author. For more information, see Licensing. Corresponds to the JSON property authorName

Returns:

  • (String)


36
37
38
# File 'generated/google/apis/poly_v1/classes.rb', line 36

def author_name
  @author_name
end

#create_timeString

For published assets, the time when the asset was published. For unpublished assets, the time when the asset was created. Corresponds to the JSON property createTime

Returns:

  • (String)


42
43
44
# File 'generated/google/apis/poly_v1/classes.rb', line 42

def create_time
  @create_time
end

#descriptionString

The human-readable description, set by the asset's author. Corresponds to the JSON property description

Returns:

  • (String)


47
48
49
# File 'generated/google/apis/poly_v1/classes.rb', line 47

def description
  @description
end

#display_nameString

The human-readable name, set by the asset's author. Corresponds to the JSON property displayName

Returns:

  • (String)


52
53
54
# File 'generated/google/apis/poly_v1/classes.rb', line 52

def display_name
  @display_name
end

#formatsArray<Google::Apis::PolyV1::Format>

A list of Formats where each format describes one representation of the asset. Corresponds to the JSON property formats

Returns:



58
59
60
# File 'generated/google/apis/poly_v1/classes.rb', line 58

def formats
  @formats
end

#is_curatedBoolean Also known as: is_curated?

Whether this asset has been curated by the Poly team. Corresponds to the JSON property isCurated

Returns:

  • (Boolean)


63
64
65
# File 'generated/google/apis/poly_v1/classes.rb', line 63

def is_curated
  @is_curated
end

#licenseString

The license under which the author has made the asset available for use, if any. Corresponds to the JSON property license

Returns:

  • (String)


70
71
72
# File 'generated/google/apis/poly_v1/classes.rb', line 70

def license
  @license
end

#metadataString

Application-defined opaque metadata for this asset. This field is only returned when querying for the signed-in user's own assets, not for public assets. This string is limited to 1K chars. It is up to the creator of the asset to define the format for this string (for example, JSON). Corresponds to the JSON property metadata

Returns:

  • (String)


78
79
80
# File 'generated/google/apis/poly_v1/classes.rb', line 78

def 
  @metadata
end

#nameString

The unique identifier for the asset in the form: assets/ASSET_ID`. Corresponds to the JSON propertyname`

Returns:

  • (String)


84
85
86
# File 'generated/google/apis/poly_v1/classes.rb', line 84

def name
  @name
end

#presentation_paramsGoogle::Apis::PolyV1::PresentationParams

Hints for displaying the asset, based on information available when the asset was uploaded. Corresponds to the JSON property presentationParams



90
91
92
# File 'generated/google/apis/poly_v1/classes.rb', line 90

def presentation_params
  @presentation_params
end

#remix_infoGoogle::Apis::PolyV1::RemixInfo

Info about the sources of this asset (i.e. assets that were remixed to create this asset). Corresponds to the JSON property remixInfo



96
97
98
# File 'generated/google/apis/poly_v1/classes.rb', line 96

def remix_info
  @remix_info
end

#thumbnailGoogle::Apis::PolyV1::File

Represents a file in Poly, which can be a root, resource, or thumbnail file. Corresponds to the JSON property thumbnail



102
103
104
# File 'generated/google/apis/poly_v1/classes.rb', line 102

def thumbnail
  @thumbnail
end

#update_timeString

The time when the asset was last modified. For published assets, whose contents are immutable, the update time changes only when metadata properties, such as visibility, are updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


109
110
111
# File 'generated/google/apis/poly_v1/classes.rb', line 109

def update_time
  @update_time
end

#visibilityString

The visibility of the asset and who can access it. Corresponds to the JSON property visibility

Returns:

  • (String)


114
115
116
# File 'generated/google/apis/poly_v1/classes.rb', line 114

def visibility
  @visibility
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'generated/google/apis/poly_v1/classes.rb', line 121

def update!(**args)
  @author_name = args[:author_name] if args.key?(:author_name)
  @create_time = args[:create_time] if args.key?(:create_time)
  @description = args[:description] if args.key?(:description)
  @display_name = args[:display_name] if args.key?(:display_name)
  @formats = args[:formats] if args.key?(:formats)
  @is_curated = args[:is_curated] if args.key?(:is_curated)
  @license = args[:license] if args.key?(:license)
  @metadata = args[:metadata] if args.key?(:metadata)
  @name = args[:name] if args.key?(:name)
  @presentation_params = args[:presentation_params] if args.key?(:presentation_params)
  @remix_info = args[:remix_info] if args.key?(:remix_info)
  @thumbnail = args[:thumbnail] if args.key?(:thumbnail)
  @update_time = args[:update_time] if args.key?(:update_time)
  @visibility = args[:visibility] if args.key?(:visibility)
end