Class: Anthropic::Models::Organization::WorkspacePolicyViolationErrorDetails

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/organization/workspace_policy_violation_error_details.rb,
sig/anthropic/models/organization/workspace_policy_violation_error_details.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(field:, error_code: :workspace_policy_violation) ⇒ WorkspacePolicyViolationErrorDetails

The request breaks the organization's Workspace Policy. The message says which rule it broke; an organization admin can see and change the policy in the Console.

Parameters:

  • field (Symbol, Anthropic::Models::Organization::WorkspacePolicyField) —

    The request field the broken rule applies to. Other values may be returned.

  • error_code (Symbol, :workspace_policy_violation) (defaults to: :workspace_policy_violation)
  • field: (Anthropic::Models::Organization::workspace_policy_field)
  • error_code: (:workspace_policy_violation) (defaults to: :workspace_policy_violation)


# File 'lib/anthropic/models/organization/workspace_policy_violation_error_details.rb', line 18

Instance Attribute Details

#error_code ⇒ Symbol, :workspace_policy_violation

Parameters:

  • value (:workspace_policy_violation)

Returns:

  • (Symbol, :workspace_policy_violation)


10
# File 'lib/anthropic/models/organization/workspace_policy_violation_error_details.rb', line 10

required :error_code, const: :workspace_policy_violation

#field ⇒ Symbol, Anthropic::Models::Organization::WorkspacePolicyField

The request field the broken rule applies to. Other values may be returned.

Parameters:

  • value (Anthropic::Models::Organization::workspace_policy_field)

Returns:



16
# File 'lib/anthropic/models/organization/workspace_policy_violation_error_details.rb', line 16

required :field, enum: -> { Anthropic::Organization::WorkspacePolicyField }

Instance Method Details

#to_hash ⇒ { error_code: :workspace_policy_violation, field: Anthropic::Models::Organization::workspace_policy_field }

Returns:

  • ({ error_code: :workspace_policy_violation, field: Anthropic::Models::Organization::workspace_policy_field })


20
21
22
23
# File 'sig/anthropic/models/organization/workspace_policy_violation_error_details.rbs', line 20

def to_hash: -> {
  error_code: :workspace_policy_violation,
  field: Anthropic::Models::Organization::workspace_policy_field
}