original_docstring: Add a boundary.
  
          A boundary represents a separation of trust and encompasses one or more components.
          In ThreatSpec, boundaries and components a linked together when either defined using
          the @alias tag, or when using a threat tag, for example:
  
              @alias boundary @user to User
              @mitigations User:@session against session hijack with use of tokens
  
          Args:
              boundary: String representing a boundary id or name.
              boundary_id: An optional string containing a boundary identifier. If this is set, then boundary must contain a name and not an identifier.
  
          Returns
              A boundary identifier.
          
docstring: Add a boundary.
  A boundary represents a separation of trust and encompasses one or more components.
  In ThreatSpec, boundaries and components a linked together when either defined using
  the @alias tag, or when using a threat tag, for example.
  
  @alias boundary @user to User
  @mitigations User:@session against session hijack with use of tokens
docstring_tokens: Add a boundary . A boundary represents a separation of trust and encompasses one or more components . In ThreatSpec boundaries and components a linked together when either defined using the @alias tag or when using a threat tag for example . @alias boundary @user to User @mitigations User : @session against session hijack with use of tokens
code: def add_boundary(self, boundary, boundary_id=None):
          """Add a boundary.
  
          A boundary represents a separation of trust and encompasses one or more components.
          In ThreatSpec, boundaries and components a linked together when either defined using
          the @alias tag, or when using a threat tag, for example:
  
              @alias boundary @user to User
              @mitigations User:@session against session hijack with use of tokens
  
          Args:
              boundary: String representing a boundary id or name.
              boundary_id: An optional string containing a boundary identifier. If this is set, then boundary must contain a name and not an identifier.
  
          Returns
              A boundary identifier.
          """
  
          if boundary_id and is_identifier(boundary):
              raise ValueError("boundary_id has been set, but boundary contains an identifier")
  
          if not boundary_id and is_identifier(boundary):
              return boundary
  
          if not boundary_id:
              boundary_id = text_to_identifier(boundary)
  
          if boundary_id not in self.boundaries:
              self.boundaries[boundary_id] = PTSBoundary(boundary)
          return boundary_id
code_tokens: def add_boundary ( self , boundary , boundary_id = None ) : if boundary_id and is_identifier ( boundary ) : raise ValueError ( "boundary_id has been set, but boundary contains an identifier" ) if not boundary_id and is_identifier ( boundary ) : return boundary if not boundary_id : boundary_id = text_to_identifier ( boundary ) if boundary_id not in self . boundaries : self . boundaries [ boundary_id ] = PTSBoundary ( boundary ) return boundary_id
short_docstring: Add a boundary.
short_docstring_tokens: Add a boundary .
comment: """Add a boundary.
  
          A boundary represents a separation of trust and encompasses one or more components.
          In ThreatSpec, boundaries and components a linked together when either defined using
          the @alias tag, or when using a threat tag, for example:
  
              @alias boundary @user to User
              @mitigations User:@session against session hijack with use of tokens
  
          Args:
              boundary: String representing a boundary id or name.
              boundary_id: An optional string containing a boundary identifier. If this is set, then boundary must contain a name and not an identifier.
  
          Returns
              A boundary identifier.
          """