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

Constructor Details

#initialize(**args) ⇒ Asset

Returns a new instance of Asset.



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

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:



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

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)


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

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)


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

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)


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

def 
  @metadata
end

#nameString

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

Returns:

  • (String)


82
83
84
# File 'generated/google/apis/poly_v1/classes.rb', line 82

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



88
89
90
# File 'generated/google/apis/poly_v1/classes.rb', line 88

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



94
95
96
# File 'generated/google/apis/poly_v1/classes.rb', line 94

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



99
100
101
# File 'generated/google/apis/poly_v1/classes.rb', line 99

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)


106
107
108
# File 'generated/google/apis/poly_v1/classes.rb', line 106

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)


111
112
113
# File 'generated/google/apis/poly_v1/classes.rb', line 111

def visibility
  @visibility
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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