Class: OpenAI::Models::Beta::Agents::Environments::TemplateUpdateParams::Network

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/agents/environments/template_update_params.rb,
sig/openai/models/beta/agents/environments/template_update_params.rbs

Defined Under Namespace

Modules: Access

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_with_error, 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(access:, allowed_domains: nil) ⇒ Object

Network access for an OpenAI-hosted environment.

Parameters:



134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/openai/models/beta/agents/environments/template_update_params.rb', line 134

class Network < OpenAI::Internal::Type::BaseModel
  # @!attribute access
  #   The environment's network access mode.
  #
  #   @return [Symbol, OpenAI::Models::Beta::Agents::Environments::TemplateUpdateParams::Network::Access]
  required :access, enum: -> { OpenAI::Beta::Agents::Environments::TemplateUpdateParams::Network::Access }

  # @!attribute allowed_domains
  #   Domains the environment may access when network access is restricted.
  #
  #   @return [Array<String>, nil]
  optional :allowed_domains, OpenAI::Internal::Type::ArrayOf[String], nil?: true

  # @!method initialize(access:, allowed_domains: nil)
  #   Network access for an OpenAI-hosted environment.
  #
  #   @param access [Symbol, OpenAI::Models::Beta::Agents::Environments::TemplateUpdateParams::Network::Access]
  #     The environment's network access mode.
  #
  #   @param allowed_domains [Array<String>, nil]
  #     Domains the environment may access when network access is restricted.

  # The environment's network access mode.
  #
  # @see OpenAI::Models::Beta::Agents::Environments::TemplateUpdateParams::Network#access
  module Access
    extend OpenAI::Internal::Type::Enum

    # Allows unrestricted network access, matching an omitted network policy.
    ENABLED = :enabled

    # Disables network access.
    DISABLED = :disabled

    # Allows access only to configured domains.
    RESTRICTED = :restricted

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#accessSymbol, OpenAI::Models::Beta::Agents::Environments::TemplateUpdateParams::Network::Access

The environment's network access mode.

Parameters:

  • value (OpenAI::Models::Beta::Agents::Environments::TemplateUpdateParams::Network::access)

Returns:



139
# File 'lib/openai/models/beta/agents/environments/template_update_params.rb', line 139

required :access, enum: -> { OpenAI::Beta::Agents::Environments::TemplateUpdateParams::Network::Access }

#allowed_domainsArray<String>?

Domains the environment may access when network access is restricted.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


145
# File 'lib/openai/models/beta/agents/environments/template_update_params.rb', line 145

optional :allowed_domains, OpenAI::Internal::Type::ArrayOf[String], nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


89
# File 'sig/openai/models/beta/agents/environments/template_update_params.rbs', line 89

def to_hash: -> {