Class: Anthropic::Models::Beta::BetaManagedAgentsUserLocation

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_managed_agents_user_location.rb,
sig/anthropic/models/beta/beta_managed_agents_user_location.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 ⇒ BetaManagedAgentsUserLocation

Returns a new instance of BetaManagedAgentsUserLocation.

Parameters:

  • city: (String, nil)
  • country: (String, nil)
  • region: (String, nil)
  • timezone: (String, nil)
  • type: (:approximate)


26
27
28
29
30
31
32
# File 'sig/anthropic/models/beta/beta_managed_agents_user_location.rbs', line 26

def initialize: (
  ?city: String?,
  ?country: String?,
  ?region: String?,
  ?timezone: String?,
  ?type: :approximate
) -> void

Instance Attribute Details

#city ⇒ String?

City name.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


17
# File 'lib/anthropic/models/beta/beta_managed_agents_user_location.rb', line 17

optional :city, String, nil?: true

#country ⇒ String?

Two-letter ISO 3166-1 country code, uppercase.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


23
# File 'lib/anthropic/models/beta/beta_managed_agents_user_location.rb', line 23

optional :country, String, nil?: true

#region ⇒ String?

Region or state name.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


29
# File 'lib/anthropic/models/beta/beta_managed_agents_user_location.rb', line 29

optional :region, String, nil?: true

#timezone ⇒ String?

IANA timezone identifier, e.g. "America/Los_Angeles".

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


35
# File 'lib/anthropic/models/beta/beta_managed_agents_user_location.rb', line 35

optional :timezone, String, nil?: true

#type ⇒ Symbol, :approximate

Location precision. Only "approximate" is supported.

Parameters:

  • value (:approximate)

Returns:

  • (Symbol, :approximate)


11
# File 'lib/anthropic/models/beta/beta_managed_agents_user_location.rb', line 11

required :type, const: :approximate

Instance Method Details

#to_hash ⇒ { type: :approximate, city: String?, country: String?, region: String?, timezone: String? }

Returns:

  • ({ type: :approximate, city: String?, country: String?, region: String?, timezone: String? })


34
35
36
37
38
39
40
# File 'sig/anthropic/models/beta/beta_managed_agents_user_location.rbs', line 34

def to_hash: -> {
  type: :approximate,
  city: String?,
  country: String?,
  region: String?,
  timezone: String?
}