Class: Google::Apis::SpannerV1::LocalizedString

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

Overview

A message representing a user-facing string whose value may need to be translated before being displayed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LocalizedString

Returns a new instance of LocalizedString.



2268
2269
2270
# File 'lib/google/apis/spanner_v1/classes.rb', line 2268

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

Instance Attribute Details

#argsHash<String,String>

A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values. Corresponds to the JSON property args

Returns:

  • (Hash<String,String>)


2253
2254
2255
# File 'lib/google/apis/spanner_v1/classes.rb', line 2253

def args
  @args
end

#messageString

The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is. Corresponds to the JSON property message

Returns:

  • (String)


2260
2261
2262
# File 'lib/google/apis/spanner_v1/classes.rb', line 2260

def message
  @message
end

#tokenString

The token identifying the message, e.g. 'METRIC_READ_CPU'. This should be unique within the service. Corresponds to the JSON property token

Returns:

  • (String)


2266
2267
2268
# File 'lib/google/apis/spanner_v1/classes.rb', line 2266

def token
  @token
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2273
2274
2275
2276
2277
# File 'lib/google/apis/spanner_v1/classes.rb', line 2273

def update!(**args)
  @args = args[:args] if args.key?(:args)
  @message = args[:message] if args.key?(:message)
  @token = args[:token] if args.key?(:token)
end