Class List Method List File List

# Class: Com::Vmware::Vapi::Std::Errors::AlreadyExists

Inherits:
  Error
  - Object
  - VAPI::Bindings::VapiError
  - Error
  - Com::Vmware::Vapi::Std::Errors::AlreadyExists
  show all
Defined in:
  /build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/std/errors.rb

## Overview

The ``Com::Vmware::Vapi::Std::Errors::AlreadyExists`` error indicates that an attempt was made to create an entity but the entity already exists. Typically the entity has a name or identifier that is required to be unique in some context, but there is already an entity with that name or identifier in that context.

     Examples:

      * Trying to create a new tag category when a tag category with the specified name already exists.
       * Trying to create a new tag in tag category when a tag with the specified name already exists the tag category.
       * Trying to create a LUN with a specific UUID on a node (for replication purposes) when a LUN with that UUID already exists on the node.
       * Trying to create a file in a directory or move or copy a file to a directory when a file with that name already exists in the directory.

## Instance Attribute Summary

### Attributes inherited from Error

#data, #messages

## Class Method Summary (collapse)

- + (VAPI::Bindings::ErrorType) binding_type

  Holds (gets or creates) the binding type metadata for this error type.

## Instance Method Summary (collapse)

- - (AlreadyExists) initialize(binding_type = self.class.binding_type, error_value = nil) constructor

  Constructs a new instance.

## Constructor Details

### - (`AlreadyExists`) initialize(binding_type = self.class.binding_type, error_value = nil)

Constructs a new instance.

Parameters:

- binding_type (`VAPI::Bindings::BindingType`) (defaults to: `self.class.binding_type`) —

  the specific BindingType declaration for this concrete VapiError type

- error_value (`VAPI::Data::ErrorValue`) (defaults to: `nil`) —

  the error value (default nil)

    1116
    1117
    1118
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/std/errors.rb', line 1116

    def initialize(binding_type=self.class.binding_type, error_value=nil)
        super(binding_type, error_value)
    end

## Class Method Details

### + (`VAPI::Bindings::ErrorType`) binding_type

Holds (gets or creates) the binding type metadata for this error type.

Returns:

- (`VAPI::Bindings::ErrorType`) —

  the binding type

    1100
    1101
    1102
    1103
    1104
    1105
    1106
    1107
    1108
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/std/errors.rb', line 1100

    def binding_type
        @binding_type ||= VAPI::Bindings::ErrorType.new(
            'com.vmware.vapi.std.errors.already_exists',
            {
                'messages' => VAPI::Bindings::ListType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Std::LocalizableMessage')),
                'data' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::DynamicStructType.new()),
            },
            AlreadyExists)
    end