Class: OpenAI::Models::Admin::Organization::Groups::UserRetrieveResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/admin/organization/groups/user_retrieve_response.rb,
sig/openai/models/admin/organization/groups/user_retrieve_response.rbs

Overview

See Also:

  • OpenAI::Resources::Admin::Organization::Groups::Users#retrieve

Defined Under Namespace

Modules: UserType

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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(id:, email:, is_service_account:, name:, picture:, user_type:) ⇒ UserRetrieveResponse

Returns a new instance of UserRetrieveResponse.

Parameters:

  • id —

    Identifier for the user.

  • email —

    Email address of the user, or null for users without an email.

  • is_service_account —

    Whether the user is a service account.

  • name —

    Display name of the user.

  • picture —

    URL of the user's profile picture, if available.

  • user_type —

    The type of user.

  • id: (String)
  • email: (String, nil)
  • is_service_account: (Boolean, nil)
  • name: (String)
  • picture: (String, nil)
  • user_type: (OpenAI::Models::Admin::Organization::Groups::UserRetrieveResponse::user_type)


# File 'lib/openai/models/admin/organization/groups/user_retrieve_response.rb', line 49

Instance Attribute Details

#email ⇒ String?

Email address of the user, or null for users without an email.

Returns:

  • (String, nil)


20
# File 'lib/openai/models/admin/organization/groups/user_retrieve_response.rb', line 20

required :email, String, nil?: true

#id ⇒ String

Identifier for the user.

Returns:

  • (String)


14
# File 'lib/openai/models/admin/organization/groups/user_retrieve_response.rb', line 14

required :id, String

#is_service_account ⇒ Boolean?

Whether the user is a service account.

Returns:



26
# File 'lib/openai/models/admin/organization/groups/user_retrieve_response.rb', line 26

required :is_service_account, OpenAI::Internal::Type::Boolean, nil?: true

#name ⇒ String

Display name of the user.

Returns:

  • (String)


32
# File 'lib/openai/models/admin/organization/groups/user_retrieve_response.rb', line 32

required :name, String

#picture ⇒ String?

URL of the user's profile picture, if available.

Returns:

  • (String, nil)


38
# File 'lib/openai/models/admin/organization/groups/user_retrieve_response.rb', line 38

required :picture, String, nil?: true

#user_type ⇒ OpenAI::Models::Admin::Organization::Groups::UserRetrieveResponse::user_type

The type of user.

Returns:

  • (OpenAI::Models::Admin::Organization::Groups::UserRetrieveResponse::user_type)


44
45
46
47
# File 'lib/openai/models/admin/organization/groups/user_retrieve_response.rb', line 44

required(
  :user_type,
  enum: -> { OpenAI::Models::Admin::Organization::Groups::UserRetrieveResponse::UserType }
)

Instance Method Details

#to_hash ⇒ { id: String, email: String?, is_service_account: bool?, name: String, picture: String?, user_type: OpenAI::Models::Admin::Organization::Groups::UserRetrieveResponse::user_type }

Returns:

  • ({ id: String, email: String?, is_service_account: bool?, name: String, picture: String?, user_type: OpenAI::Models::Admin::Organization::Groups::UserRetrieveResponse::user_type })


56
57
58
59
60
61
62
63
# File 'sig/openai/models/admin/organization/groups/user_retrieve_response.rbs', line 56

def to_hash: -> {
  id: String,
  email: String?,
  is_service_account: bool?,
  name: String,
  picture: String?,
  user_type: OpenAI::Models::Admin::Organization::Groups::UserRetrieveResponse::user_type
}