Class: OpenAI::Models::Responses::ContainerNetworkPolicyAllowlist

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/responses/container_network_policy_allowlist.rb,
sig/openai/models/responses/container_network_policy_allowlist.rbs

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(allowed_domains:, domain_secrets: nil, type: :allowlist) ⇒ ContainerNetworkPolicyAllowlist

Returns a new instance of ContainerNetworkPolicyAllowlist.

Parameters:

  • allowed_domains —

    A list of allowed domains when type is allowlist.

  • domain_secrets (defaults to: nil) —

    Optional domain-scoped secrets for allowlisted domains.

  • type (defaults to: :allowlist) —

    Allow outbound network access only to specified domains. Always allowlist.

  • allowed_domains: (::Array[String])
  • domain_secrets: (::Array[OpenAI::Responses::ContainerNetworkPolicyDomainSecret]) (defaults to: nil)
  • type: (:allowlist) (defaults to: :allowlist)


# File 'lib/openai/models/responses/container_network_policy_allowlist.rb', line 28

Instance Attribute Details

#allowed_domains ⇒ ::Array[String]

A list of allowed domains when type is allowlist.

Returns:

  • (::Array[String])


11
# File 'lib/openai/models/responses/container_network_policy_allowlist.rb', line 11

required :allowed_domains, OpenAI::Internal::Type::ArrayOf[String]

#domain_secrets ⇒ ::Array[OpenAI::Responses::ContainerNetworkPolicyDomainSecret]?

Optional domain-scoped secrets for allowlisted domains.

Returns:

  • (::Array[OpenAI::Responses::ContainerNetworkPolicyDomainSecret], nil)


23
24
25
26
# File 'lib/openai/models/responses/container_network_policy_allowlist.rb', line 23

optional(
  :domain_secrets,
  -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Responses::ContainerNetworkPolicyDomainSecret] }
)

#type ⇒ :allowlist

Allow outbound network access only to specified domains. Always allowlist.

Returns:

  • (:allowlist)


17
# File 'lib/openai/models/responses/container_network_policy_allowlist.rb', line 17

required :type, const: :allowlist

Instance Method Details

#to_hash ⇒ { allowed_domains: ::Array[String], ?type: :allowlist, ?domain_secrets: ::Array[OpenAI::Responses::ContainerNetworkPolicyDomainSecret] }

Returns:

  • ({ allowed_domains: ::Array[String], ?type: :allowlist, ?domain_secrets: ::Array[OpenAI::Responses::ContainerNetworkPolicyDomainSecret] })


38
39
40
41
42
# File 'sig/openai/models/responses/container_network_policy_allowlist.rbs', line 38

def to_hash: -> {
  allowed_domains: ::Array[String],
  ?type: :allowlist,
  ?domain_secrets: ::Array[OpenAI::Responses::ContainerNetworkPolicyDomainSecret]
}