Class List Method List File List

# Class: Com::Vmware::Vapi::Metadata::Privilege::Package

Inherits:
  VAPI::Bindings::VapiService
  - Object
  - VAPI::Bindings::VapiService
  - Com::Vmware::Vapi::Metadata::Privilege::Package
  show all
Defined in:
  /build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/privilege.rb

## Overview

The ``Com::Vmware::Vapi::Metadata::Privilege::Package`` class provides methods to retrieve privilege information of a package element.

     A package element is said to contain privilege information if there is a default privilege assigned to all service elements contained in the package element or if one of the operation elements contained in one of the service elements in this package element has privilege information.

## Constant Summary

RESOURCE_TYPE =

      'com.vmware.vapi.package'

## Instance Method Summary (collapse)

- - (Com::Vmware::Vapi::Metadata::Privilege::PackageInfo) get(package_id)

  Retrieves privilege information about the package element corresponding to ``package_id`` .

- - (Package) initialize(config) constructor

  Constructs a new instance.

- - (Array<String>) list

  Returns the identifiers for the package elements that have privilege information.

## Constructor Details

### - (`Package`) initialize(config)

Constructs a new instance.

Parameters:

- config (`VAPI::Bindings::StubConfig`) —

  A hash with the api provider details.

    174
    175
    176
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/privilege.rb', line 174

    def initialize(config)
        super(config, @@service_info)
    end

## Instance Method Details

### - (`Com::Vmware::Vapi::Metadata::Privilege::PackageInfo`) get(package_id)

Retrieves privilege information about the package element corresponding to ``package_id`` .

Parameters:

- package_id (`String`) —

  Identifier of the package element.

Returns:

- (`Com::Vmware::Vapi::Metadata::Privilege::PackageInfo`) —

  The :class:`Com::Vmware::Vapi::Metadata::Privilege::PackageInfo` instance that corresponds to ``package_id``

Raises:

- (`Com::Vmware::Vapi::Std::Errors::NotFound`) —

  if the package element associated with ``package_id`` does not have any privilege information.

    198
    199
    200
    201
    202
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/privilege.rb', line 198

    def get(package_id)
        invoke_with_info(@@get_info, {
            'package_id' => package_id,
        })
    end

### - (`Array<String>`) list

Returns the identifiers for the package elements that have privilege information.

Returns:

- (`Array<String>`) —

  The list of identifiers for the package elements that have privilege information.

    185
    186
    187
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/privilege.rb', line 185

    def list()
        invoke_with_info(@@list_info)
    end