Class List Method List File List

# Class: Com::Vmware::Content::Library::Item::DownloadSessionModel

Inherits:
  VAPI::Bindings::VapiStruct
  - Object
  - VAPI::Bindings::VapiStruct
  - Com::Vmware::Content::Library::Item::DownloadSessionModel
  show all
Defined in:
  /build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item.rb

## Overview

The ``Com::Vmware::Content::Library::Item::DownloadSessionModel`` class provides information on an active :class:`Com::Vmware::Content::Library::Item::DownloadSession` resource.

## Defined Under Namespace

Classes: State

## Instance Attribute Summary (collapse)

- - (Fixnum) client_progress

  The progress that has been made with the download.

- - (Com::Vmware::Vapi::Std::LocalizableMessage) error_message

  If the session is in the :attr:`Com::Vmware::Content::Library::Item::DownloadSessionModel::State.ERROR` status this property will have more details about the error.

- - (DateTime) expiration_time

  Indicates the time after which the session will expire.

- - (String) id

  The identifier of this download session.

- - (String) library_item_content_version

  The content version of the library item whose content is being downloaded.

- - (String) library_item_id

  The identifier of the library item whose content is being downloaded.

- - (Com::Vmware::Content::Library::Item::DownloadSessionModel::State) state

  The current state ( ``ACTIVE``, ``CANCELED``, ``ERROR`` ) of the download session.

## Class Method Summary (collapse)

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

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

## Instance Method Summary (collapse)

- - (DownloadSessionModel) initialize(ruby_values = nil, struct_value = nil) constructor

  Constructs a new instance.

## Constructor Details

### - (`DownloadSessionModel`) initialize(ruby_values = nil, struct_value = nil)

Constructs a new instance.

Parameters:

- ruby_values (`Hash`) (defaults to: `nil`) —

  a map of initial property values (optional)

- struct_value (`VAPI::Data::StructValue`) (defaults to: `nil`) —

  a raw StructValue from the wire (optional)

    1045
    1046
    1047
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item.rb', line 1045

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

## Instance Attribute Details

### - (`Fixnum`) client_progress

The progress that has been made with the download. This property is to be updated by the client during the download process to indicate the progress of its work in completing the download. The initial progress is 0 until updated by the client. The maximum value is 100, which indicates that the download is complete. This field is not used for the ``create`` method . It will always be present in the result of the ``get`` or ``list`` methods . It is optional for the ``update`` method .

Returns:

- (`Fixnum`)

    1010
    1011
    1012
    1013
    1014
    1015
    1016
    1017
    1018
    1019
    1020
    1021
    1022
    1023
    1024
    1025
    1026
    1027
    1028
    1029
    1030
    1031
    1032
    1033
    1034
    1035
    1036
    1037
    1038
    1039
    1040
    1041
    1042
    1043
    1044
    1045
    1046
    1047
    1048
    1049
    1050
    1051
    1052
    1053
    1054
    1055
    1056
    1057
    1058
    1059
    1060
    1061
    1062
    1063
    1064
    1065
    1066
    1067
    1068
    1069
    1070
    1071
    1072
    1073
    1074
    1075
    1076
    1077
    1078
    1079
    1080
    1081
    1082
    1083
    1084
    1085
    1086
    1087
    1088
    1089
    1090
    1091
    1092
    1093
    1094
    1095
    1096
    1097
    1098
    1099
    1100
    1101
    1102
    1103
    1104
    1105
    1106
    1107
    1108
    1109
    1110
    1111
    1112
    1113
    1114
    1115
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item.rb', line 1010

    class DownloadSessionModel < VAPI::Bindings::VapiStruct

        class << self
            # Holds (gets or creates) the binding type metadata for this structure type.
            # @scope class
            # @return [VAPI::Bindings::StructType] the binding type
            def binding_type
                @binding_type ||= VAPI::Bindings::StructType.new(
                    'com.vmware.content.library.item.download_session_model',
                    {
                        'id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'library_item_id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'library_item_content_version' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
                        'error_message' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Std::LocalizableMessage')),
                        'client_progress' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                        'state' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Content::Library::Item::DownloadSessionModel::State')),
                        'expiration_time' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::DateTimeType.instance),
                    },
                    DownloadSessionModel,
                    true,
                    ["id"])
            end
        end

        attr_accessor :id,
                      :library_item_id,
                      :library_item_content_version,
                      :error_message,
                      :client_progress,
                      :state,
                      :expiration_time

        # Constructs a new instance.
        # @param ruby_values [Hash] a map of initial property values (optional)
        # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
        def initialize(ruby_values=nil, struct_value=nil)
            super(self.class.binding_type, ruby_values, struct_value)
        end

        # The state of the download session.
        # @!attribute [rw] active
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     The session is active. Individual files may be in the process of being transferred and may become ready for download at different times.
        # @!attribute [rw] canceled
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     The session has been canceled. On-going downloads may fail. The session will stay in this state until it is either deleted by the user or automatically cleaned up by the Content Library Service.
        # @!attribute [rw] error
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     Indicates there was an error during the session lifecycle.
        class State < VAPI::Bindings::VapiEnum

            class << self
                # Holds (gets or creates) the binding type metadata for this enumeration type.
                # @scope class
                # @return [VAPI::Bindings::EnumType] the binding type
                def binding_type
                    @binding_type ||= VAPI::Bindings::EnumType.new(
                        'com.vmware.content.library.item.download_session_model.state',
                        State)
                end

                # Converts from a string value (perhaps off the wire) to an instance
                # of this enum type.
                # @param value [String] the actual value of the enum instance
                # @return [State] the instance found for the value, otherwise
                #         an unknown instance will be built for the value
                def from_string(value)
                    begin
                        const_get(value)
                    rescue NameError
                        State.new('UNKNOWN', value)
                    end
                end
            end

            private

            # Constructs a new instance.
            # @param value [String] the actual value of the enum instance
            # @param unknown [String] the unknown value when value is 'UKNOWN'
            def initialize(value, unknown=nil)
                super(self.class.binding_type, value, unknown)
            end

            public

            # @!attribute [rw] active
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     The session is active. Individual files may be in the process of being transferred and may become ready for download at different times.
            ACTIVE = State.new('ACTIVE')

            # @!attribute [rw] canceled
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     The session has been canceled. On-going downloads may fail. The session will stay in this state until it is either deleted by the user or automatically cleaned up by the Content Library Service.
            CANCELED = State.new('CANCELED')

            # @!attribute [rw] error
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     Indicates there was an error during the session lifecycle.
            ERROR = State.new('ERROR')

        end

    end

### - (`Com::Vmware::Vapi::Std::LocalizableMessage`) error_message

If the session is in the :attr:`Com::Vmware::Content::Library::Item::DownloadSessionModel::State.ERROR` status this property will have more details about the error. This field is not used for the ``create`` method . It is optional in the result of the ``get`` or ``list`` methods . It is not used for the ``update`` method .

Returns:

- (`Com::Vmware::Vapi::Std::LocalizableMessage`)

    1010
    1011
    1012
    1013
    1014
    1015
    1016
    1017
    1018
    1019
    1020
    1021
    1022
    1023
    1024
    1025
    1026
    1027
    1028
    1029
    1030
    1031
    1032
    1033
    1034
    1035
    1036
    1037
    1038
    1039
    1040
    1041
    1042
    1043
    1044
    1045
    1046
    1047
    1048
    1049
    1050
    1051
    1052
    1053
    1054
    1055
    1056
    1057
    1058
    1059
    1060
    1061
    1062
    1063
    1064
    1065
    1066
    1067
    1068
    1069
    1070
    1071
    1072
    1073
    1074
    1075
    1076
    1077
    1078
    1079
    1080
    1081
    1082
    1083
    1084
    1085
    1086
    1087
    1088
    1089
    1090
    1091
    1092
    1093
    1094
    1095
    1096
    1097
    1098
    1099
    1100
    1101
    1102
    1103
    1104
    1105
    1106
    1107
    1108
    1109
    1110
    1111
    1112
    1113
    1114
    1115
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item.rb', line 1010

    class DownloadSessionModel < VAPI::Bindings::VapiStruct

        class << self
            # Holds (gets or creates) the binding type metadata for this structure type.
            # @scope class
            # @return [VAPI::Bindings::StructType] the binding type
            def binding_type
                @binding_type ||= VAPI::Bindings::StructType.new(
                    'com.vmware.content.library.item.download_session_model',
                    {
                        'id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'library_item_id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'library_item_content_version' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
                        'error_message' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Std::LocalizableMessage')),
                        'client_progress' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                        'state' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Content::Library::Item::DownloadSessionModel::State')),
                        'expiration_time' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::DateTimeType.instance),
                    },
                    DownloadSessionModel,
                    true,
                    ["id"])
            end
        end

        attr_accessor :id,
                      :library_item_id,
                      :library_item_content_version,
                      :error_message,
                      :client_progress,
                      :state,
                      :expiration_time

        # Constructs a new instance.
        # @param ruby_values [Hash] a map of initial property values (optional)
        # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
        def initialize(ruby_values=nil, struct_value=nil)
            super(self.class.binding_type, ruby_values, struct_value)
        end

        # The state of the download session.
        # @!attribute [rw] active
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     The session is active. Individual files may be in the process of being transferred and may become ready for download at different times.
        # @!attribute [rw] canceled
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     The session has been canceled. On-going downloads may fail. The session will stay in this state until it is either deleted by the user or automatically cleaned up by the Content Library Service.
        # @!attribute [rw] error
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     Indicates there was an error during the session lifecycle.
        class State < VAPI::Bindings::VapiEnum

            class << self
                # Holds (gets or creates) the binding type metadata for this enumeration type.
                # @scope class
                # @return [VAPI::Bindings::EnumType] the binding type
                def binding_type
                    @binding_type ||= VAPI::Bindings::EnumType.new(
                        'com.vmware.content.library.item.download_session_model.state',
                        State)
                end

                # Converts from a string value (perhaps off the wire) to an instance
                # of this enum type.
                # @param value [String] the actual value of the enum instance
                # @return [State] the instance found for the value, otherwise
                #         an unknown instance will be built for the value
                def from_string(value)
                    begin
                        const_get(value)
                    rescue NameError
                        State.new('UNKNOWN', value)
                    end
                end
            end

            private

            # Constructs a new instance.
            # @param value [String] the actual value of the enum instance
            # @param unknown [String] the unknown value when value is 'UKNOWN'
            def initialize(value, unknown=nil)
                super(self.class.binding_type, value, unknown)
            end

            public

            # @!attribute [rw] active
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     The session is active. Individual files may be in the process of being transferred and may become ready for download at different times.
            ACTIVE = State.new('ACTIVE')

            # @!attribute [rw] canceled
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     The session has been canceled. On-going downloads may fail. The session will stay in this state until it is either deleted by the user or automatically cleaned up by the Content Library Service.
            CANCELED = State.new('CANCELED')

            # @!attribute [rw] error
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     Indicates there was an error during the session lifecycle.
            ERROR = State.new('ERROR')

        end

    end

### - (`DateTime`) expiration_time

Indicates the time after which the session will expire. The session is guaranteed not to expire before this time. This field is not used for the ``create`` method . It will always be present in the result of the ``get`` or ``list`` methods . It is not used for the ``update`` method .

Returns:

- (`DateTime`)

    1010
    1011
    1012
    1013
    1014
    1015
    1016
    1017
    1018
    1019
    1020
    1021
    1022
    1023
    1024
    1025
    1026
    1027
    1028
    1029
    1030
    1031
    1032
    1033
    1034
    1035
    1036
    1037
    1038
    1039
    1040
    1041
    1042
    1043
    1044
    1045
    1046
    1047
    1048
    1049
    1050
    1051
    1052
    1053
    1054
    1055
    1056
    1057
    1058
    1059
    1060
    1061
    1062
    1063
    1064
    1065
    1066
    1067
    1068
    1069
    1070
    1071
    1072
    1073
    1074
    1075
    1076
    1077
    1078
    1079
    1080
    1081
    1082
    1083
    1084
    1085
    1086
    1087
    1088
    1089
    1090
    1091
    1092
    1093
    1094
    1095
    1096
    1097
    1098
    1099
    1100
    1101
    1102
    1103
    1104
    1105
    1106
    1107
    1108
    1109
    1110
    1111
    1112
    1113
    1114
    1115
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item.rb', line 1010

    class DownloadSessionModel < VAPI::Bindings::VapiStruct

        class << self
            # Holds (gets or creates) the binding type metadata for this structure type.
            # @scope class
            # @return [VAPI::Bindings::StructType] the binding type
            def binding_type
                @binding_type ||= VAPI::Bindings::StructType.new(
                    'com.vmware.content.library.item.download_session_model',
                    {
                        'id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'library_item_id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'library_item_content_version' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
                        'error_message' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Std::LocalizableMessage')),
                        'client_progress' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                        'state' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Content::Library::Item::DownloadSessionModel::State')),
                        'expiration_time' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::DateTimeType.instance),
                    },
                    DownloadSessionModel,
                    true,
                    ["id"])
            end
        end

        attr_accessor :id,
                      :library_item_id,
                      :library_item_content_version,
                      :error_message,
                      :client_progress,
                      :state,
                      :expiration_time

        # Constructs a new instance.
        # @param ruby_values [Hash] a map of initial property values (optional)
        # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
        def initialize(ruby_values=nil, struct_value=nil)
            super(self.class.binding_type, ruby_values, struct_value)
        end

        # The state of the download session.
        # @!attribute [rw] active
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     The session is active. Individual files may be in the process of being transferred and may become ready for download at different times.
        # @!attribute [rw] canceled
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     The session has been canceled. On-going downloads may fail. The session will stay in this state until it is either deleted by the user or automatically cleaned up by the Content Library Service.
        # @!attribute [rw] error
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     Indicates there was an error during the session lifecycle.
        class State < VAPI::Bindings::VapiEnum

            class << self
                # Holds (gets or creates) the binding type metadata for this enumeration type.
                # @scope class
                # @return [VAPI::Bindings::EnumType] the binding type
                def binding_type
                    @binding_type ||= VAPI::Bindings::EnumType.new(
                        'com.vmware.content.library.item.download_session_model.state',
                        State)
                end

                # Converts from a string value (perhaps off the wire) to an instance
                # of this enum type.
                # @param value [String] the actual value of the enum instance
                # @return [State] the instance found for the value, otherwise
                #         an unknown instance will be built for the value
                def from_string(value)
                    begin
                        const_get(value)
                    rescue NameError
                        State.new('UNKNOWN', value)
                    end
                end
            end

            private

            # Constructs a new instance.
            # @param value [String] the actual value of the enum instance
            # @param unknown [String] the unknown value when value is 'UKNOWN'
            def initialize(value, unknown=nil)
                super(self.class.binding_type, value, unknown)
            end

            public

            # @!attribute [rw] active
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     The session is active. Individual files may be in the process of being transferred and may become ready for download at different times.
            ACTIVE = State.new('ACTIVE')

            # @!attribute [rw] canceled
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     The session has been canceled. On-going downloads may fail. The session will stay in this state until it is either deleted by the user or automatically cleaned up by the Content Library Service.
            CANCELED = State.new('CANCELED')

            # @!attribute [rw] error
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     Indicates there was an error during the session lifecycle.
            ERROR = State.new('ERROR')

        end

    end

### - (`String`) id

The identifier of this download session. This field is not used for the ``create`` method . It will not be present in the result of the ``get`` or ``list`` methods . It is not used for the ``update`` method .

Returns:

- (`String`)

    1010
    1011
    1012
    1013
    1014
    1015
    1016
    1017
    1018
    1019
    1020
    1021
    1022
    1023
    1024
    1025
    1026
    1027
    1028
    1029
    1030
    1031
    1032
    1033
    1034
    1035
    1036
    1037
    1038
    1039
    1040
    1041
    1042
    1043
    1044
    1045
    1046
    1047
    1048
    1049
    1050
    1051
    1052
    1053
    1054
    1055
    1056
    1057
    1058
    1059
    1060
    1061
    1062
    1063
    1064
    1065
    1066
    1067
    1068
    1069
    1070
    1071
    1072
    1073
    1074
    1075
    1076
    1077
    1078
    1079
    1080
    1081
    1082
    1083
    1084
    1085
    1086
    1087
    1088
    1089
    1090
    1091
    1092
    1093
    1094
    1095
    1096
    1097
    1098
    1099
    1100
    1101
    1102
    1103
    1104
    1105
    1106
    1107
    1108
    1109
    1110
    1111
    1112
    1113
    1114
    1115
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item.rb', line 1010

    class DownloadSessionModel < VAPI::Bindings::VapiStruct

        class << self
            # Holds (gets or creates) the binding type metadata for this structure type.
            # @scope class
            # @return [VAPI::Bindings::StructType] the binding type
            def binding_type
                @binding_type ||= VAPI::Bindings::StructType.new(
                    'com.vmware.content.library.item.download_session_model',
                    {
                        'id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'library_item_id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'library_item_content_version' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
                        'error_message' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Std::LocalizableMessage')),
                        'client_progress' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                        'state' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Content::Library::Item::DownloadSessionModel::State')),
                        'expiration_time' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::DateTimeType.instance),
                    },
                    DownloadSessionModel,
                    true,
                    ["id"])
            end
        end

        attr_accessor :id,
                      :library_item_id,
                      :library_item_content_version,
                      :error_message,
                      :client_progress,
                      :state,
                      :expiration_time

        # Constructs a new instance.
        # @param ruby_values [Hash] a map of initial property values (optional)
        # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
        def initialize(ruby_values=nil, struct_value=nil)
            super(self.class.binding_type, ruby_values, struct_value)
        end

        # The state of the download session.
        # @!attribute [rw] active
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     The session is active. Individual files may be in the process of being transferred and may become ready for download at different times.
        # @!attribute [rw] canceled
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     The session has been canceled. On-going downloads may fail. The session will stay in this state until it is either deleted by the user or automatically cleaned up by the Content Library Service.
        # @!attribute [rw] error
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     Indicates there was an error during the session lifecycle.
        class State < VAPI::Bindings::VapiEnum

            class << self
                # Holds (gets or creates) the binding type metadata for this enumeration type.
                # @scope class
                # @return [VAPI::Bindings::EnumType] the binding type
                def binding_type
                    @binding_type ||= VAPI::Bindings::EnumType.new(
                        'com.vmware.content.library.item.download_session_model.state',
                        State)
                end

                # Converts from a string value (perhaps off the wire) to an instance
                # of this enum type.
                # @param value [String] the actual value of the enum instance
                # @return [State] the instance found for the value, otherwise
                #         an unknown instance will be built for the value
                def from_string(value)
                    begin
                        const_get(value)
                    rescue NameError
                        State.new('UNKNOWN', value)
                    end
                end
            end

            private

            # Constructs a new instance.
            # @param value [String] the actual value of the enum instance
            # @param unknown [String] the unknown value when value is 'UKNOWN'
            def initialize(value, unknown=nil)
                super(self.class.binding_type, value, unknown)
            end

            public

            # @!attribute [rw] active
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     The session is active. Individual files may be in the process of being transferred and may become ready for download at different times.
            ACTIVE = State.new('ACTIVE')

            # @!attribute [rw] canceled
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     The session has been canceled. On-going downloads may fail. The session will stay in this state until it is either deleted by the user or automatically cleaned up by the Content Library Service.
            CANCELED = State.new('CANCELED')

            # @!attribute [rw] error
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     Indicates there was an error during the session lifecycle.
            ERROR = State.new('ERROR')

        end

    end

### - (`String`) library_item_content_version

The content version of the library item whose content is being downloaded. This value is the :attr:`Com::Vmware::Content::Library::ItemModel.content_version` at the time when the session is created for the library item. This field is not used for the ``create`` method . It will always be present in the result of the ``get`` or ``list`` methods . It is not used for the ``update`` method .

Returns:

- (`String`)

    1010
    1011
    1012
    1013
    1014
    1015
    1016
    1017
    1018
    1019
    1020
    1021
    1022
    1023
    1024
    1025
    1026
    1027
    1028
    1029
    1030
    1031
    1032
    1033
    1034
    1035
    1036
    1037
    1038
    1039
    1040
    1041
    1042
    1043
    1044
    1045
    1046
    1047
    1048
    1049
    1050
    1051
    1052
    1053
    1054
    1055
    1056
    1057
    1058
    1059
    1060
    1061
    1062
    1063
    1064
    1065
    1066
    1067
    1068
    1069
    1070
    1071
    1072
    1073
    1074
    1075
    1076
    1077
    1078
    1079
    1080
    1081
    1082
    1083
    1084
    1085
    1086
    1087
    1088
    1089
    1090
    1091
    1092
    1093
    1094
    1095
    1096
    1097
    1098
    1099
    1100
    1101
    1102
    1103
    1104
    1105
    1106
    1107
    1108
    1109
    1110
    1111
    1112
    1113
    1114
    1115
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item.rb', line 1010

    class DownloadSessionModel < VAPI::Bindings::VapiStruct

        class << self
            # Holds (gets or creates) the binding type metadata for this structure type.
            # @scope class
            # @return [VAPI::Bindings::StructType] the binding type
            def binding_type
                @binding_type ||= VAPI::Bindings::StructType.new(
                    'com.vmware.content.library.item.download_session_model',
                    {
                        'id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'library_item_id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'library_item_content_version' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
                        'error_message' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Std::LocalizableMessage')),
                        'client_progress' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                        'state' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Content::Library::Item::DownloadSessionModel::State')),
                        'expiration_time' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::DateTimeType.instance),
                    },
                    DownloadSessionModel,
                    true,
                    ["id"])
            end
        end

        attr_accessor :id,
                      :library_item_id,
                      :library_item_content_version,
                      :error_message,
                      :client_progress,
                      :state,
                      :expiration_time

        # Constructs a new instance.
        # @param ruby_values [Hash] a map of initial property values (optional)
        # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
        def initialize(ruby_values=nil, struct_value=nil)
            super(self.class.binding_type, ruby_values, struct_value)
        end

        # The state of the download session.
        # @!attribute [rw] active
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     The session is active. Individual files may be in the process of being transferred and may become ready for download at different times.
        # @!attribute [rw] canceled
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     The session has been canceled. On-going downloads may fail. The session will stay in this state until it is either deleted by the user or automatically cleaned up by the Content Library Service.
        # @!attribute [rw] error
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     Indicates there was an error during the session lifecycle.
        class State < VAPI::Bindings::VapiEnum

            class << self
                # Holds (gets or creates) the binding type metadata for this enumeration type.
                # @scope class
                # @return [VAPI::Bindings::EnumType] the binding type
                def binding_type
                    @binding_type ||= VAPI::Bindings::EnumType.new(
                        'com.vmware.content.library.item.download_session_model.state',
                        State)
                end

                # Converts from a string value (perhaps off the wire) to an instance
                # of this enum type.
                # @param value [String] the actual value of the enum instance
                # @return [State] the instance found for the value, otherwise
                #         an unknown instance will be built for the value
                def from_string(value)
                    begin
                        const_get(value)
                    rescue NameError
                        State.new('UNKNOWN', value)
                    end
                end
            end

            private

            # Constructs a new instance.
            # @param value [String] the actual value of the enum instance
            # @param unknown [String] the unknown value when value is 'UKNOWN'
            def initialize(value, unknown=nil)
                super(self.class.binding_type, value, unknown)
            end

            public

            # @!attribute [rw] active
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     The session is active. Individual files may be in the process of being transferred and may become ready for download at different times.
            ACTIVE = State.new('ACTIVE')

            # @!attribute [rw] canceled
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     The session has been canceled. On-going downloads may fail. The session will stay in this state until it is either deleted by the user or automatically cleaned up by the Content Library Service.
            CANCELED = State.new('CANCELED')

            # @!attribute [rw] error
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     Indicates there was an error during the session lifecycle.
            ERROR = State.new('ERROR')

        end

    end

### - (`String`) library_item_id

The identifier of the library item whose content is being downloaded. This field must be provided for the ``create`` method . It will always be present in the result of the ``get`` or ``list`` methods . It is not used for the ``update`` method .

Returns:

- (`String`)

    1010
    1011
    1012
    1013
    1014
    1015
    1016
    1017
    1018
    1019
    1020
    1021
    1022
    1023
    1024
    1025
    1026
    1027
    1028
    1029
    1030
    1031
    1032
    1033
    1034
    1035
    1036
    1037
    1038
    1039
    1040
    1041
    1042
    1043
    1044
    1045
    1046
    1047
    1048
    1049
    1050
    1051
    1052
    1053
    1054
    1055
    1056
    1057
    1058
    1059
    1060
    1061
    1062
    1063
    1064
    1065
    1066
    1067
    1068
    1069
    1070
    1071
    1072
    1073
    1074
    1075
    1076
    1077
    1078
    1079
    1080
    1081
    1082
    1083
    1084
    1085
    1086
    1087
    1088
    1089
    1090
    1091
    1092
    1093
    1094
    1095
    1096
    1097
    1098
    1099
    1100
    1101
    1102
    1103
    1104
    1105
    1106
    1107
    1108
    1109
    1110
    1111
    1112
    1113
    1114
    1115
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item.rb', line 1010

    class DownloadSessionModel < VAPI::Bindings::VapiStruct

        class << self
            # Holds (gets or creates) the binding type metadata for this structure type.
            # @scope class
            # @return [VAPI::Bindings::StructType] the binding type
            def binding_type
                @binding_type ||= VAPI::Bindings::StructType.new(
                    'com.vmware.content.library.item.download_session_model',
                    {
                        'id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'library_item_id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'library_item_content_version' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
                        'error_message' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Std::LocalizableMessage')),
                        'client_progress' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                        'state' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Content::Library::Item::DownloadSessionModel::State')),
                        'expiration_time' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::DateTimeType.instance),
                    },
                    DownloadSessionModel,
                    true,
                    ["id"])
            end
        end

        attr_accessor :id,
                      :library_item_id,
                      :library_item_content_version,
                      :error_message,
                      :client_progress,
                      :state,
                      :expiration_time

        # Constructs a new instance.
        # @param ruby_values [Hash] a map of initial property values (optional)
        # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
        def initialize(ruby_values=nil, struct_value=nil)
            super(self.class.binding_type, ruby_values, struct_value)
        end

        # The state of the download session.
        # @!attribute [rw] active
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     The session is active. Individual files may be in the process of being transferred and may become ready for download at different times.
        # @!attribute [rw] canceled
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     The session has been canceled. On-going downloads may fail. The session will stay in this state until it is either deleted by the user or automatically cleaned up by the Content Library Service.
        # @!attribute [rw] error
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     Indicates there was an error during the session lifecycle.
        class State < VAPI::Bindings::VapiEnum

            class << self
                # Holds (gets or creates) the binding type metadata for this enumeration type.
                # @scope class
                # @return [VAPI::Bindings::EnumType] the binding type
                def binding_type
                    @binding_type ||= VAPI::Bindings::EnumType.new(
                        'com.vmware.content.library.item.download_session_model.state',
                        State)
                end

                # Converts from a string value (perhaps off the wire) to an instance
                # of this enum type.
                # @param value [String] the actual value of the enum instance
                # @return [State] the instance found for the value, otherwise
                #         an unknown instance will be built for the value
                def from_string(value)
                    begin
                        const_get(value)
                    rescue NameError
                        State.new('UNKNOWN', value)
                    end
                end
            end

            private

            # Constructs a new instance.
            # @param value [String] the actual value of the enum instance
            # @param unknown [String] the unknown value when value is 'UKNOWN'
            def initialize(value, unknown=nil)
                super(self.class.binding_type, value, unknown)
            end

            public

            # @!attribute [rw] active
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     The session is active. Individual files may be in the process of being transferred and may become ready for download at different times.
            ACTIVE = State.new('ACTIVE')

            # @!attribute [rw] canceled
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     The session has been canceled. On-going downloads may fail. The session will stay in this state until it is either deleted by the user or automatically cleaned up by the Content Library Service.
            CANCELED = State.new('CANCELED')

            # @!attribute [rw] error
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     Indicates there was an error during the session lifecycle.
            ERROR = State.new('ERROR')

        end

    end

### - (`Com::Vmware::Content::Library::Item::DownloadSessionModel::State`) state

The current state ( ``ACTIVE``, ``CANCELED``, ``ERROR`` ) of the download session. This field is not used for the ``create`` method . It will always be present in the result of the ``get`` or ``list`` methods . It is not used for the ``update`` method .

Returns:

- (`Com::Vmware::Content::Library::Item::DownloadSessionModel::State`)

    1010
    1011
    1012
    1013
    1014
    1015
    1016
    1017
    1018
    1019
    1020
    1021
    1022
    1023
    1024
    1025
    1026
    1027
    1028
    1029
    1030
    1031
    1032
    1033
    1034
    1035
    1036
    1037
    1038
    1039
    1040
    1041
    1042
    1043
    1044
    1045
    1046
    1047
    1048
    1049
    1050
    1051
    1052
    1053
    1054
    1055
    1056
    1057
    1058
    1059
    1060
    1061
    1062
    1063
    1064
    1065
    1066
    1067
    1068
    1069
    1070
    1071
    1072
    1073
    1074
    1075
    1076
    1077
    1078
    1079
    1080
    1081
    1082
    1083
    1084
    1085
    1086
    1087
    1088
    1089
    1090
    1091
    1092
    1093
    1094
    1095
    1096
    1097
    1098
    1099
    1100
    1101
    1102
    1103
    1104
    1105
    1106
    1107
    1108
    1109
    1110
    1111
    1112
    1113
    1114
    1115
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item.rb', line 1010

    class DownloadSessionModel < VAPI::Bindings::VapiStruct

        class << self
            # Holds (gets or creates) the binding type metadata for this structure type.
            # @scope class
            # @return [VAPI::Bindings::StructType] the binding type
            def binding_type
                @binding_type ||= VAPI::Bindings::StructType.new(
                    'com.vmware.content.library.item.download_session_model',
                    {
                        'id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'library_item_id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                        'library_item_content_version' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
                        'error_message' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Std::LocalizableMessage')),
                        'client_progress' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                        'state' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Content::Library::Item::DownloadSessionModel::State')),
                        'expiration_time' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::DateTimeType.instance),
                    },
                    DownloadSessionModel,
                    true,
                    ["id"])
            end
        end

        attr_accessor :id,
                      :library_item_id,
                      :library_item_content_version,
                      :error_message,
                      :client_progress,
                      :state,
                      :expiration_time

        # Constructs a new instance.
        # @param ruby_values [Hash] a map of initial property values (optional)
        # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
        def initialize(ruby_values=nil, struct_value=nil)
            super(self.class.binding_type, ruby_values, struct_value)
        end

        # The state of the download session.
        # @!attribute [rw] active
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     The session is active. Individual files may be in the process of being transferred and may become ready for download at different times.
        # @!attribute [rw] canceled
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     The session has been canceled. On-going downloads may fail. The session will stay in this state until it is either deleted by the user or automatically cleaned up by the Content Library Service.
        # @!attribute [rw] error
        #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
        #     Indicates there was an error during the session lifecycle.
        class State < VAPI::Bindings::VapiEnum

            class << self
                # Holds (gets or creates) the binding type metadata for this enumeration type.
                # @scope class
                # @return [VAPI::Bindings::EnumType] the binding type
                def binding_type
                    @binding_type ||= VAPI::Bindings::EnumType.new(
                        'com.vmware.content.library.item.download_session_model.state',
                        State)
                end

                # Converts from a string value (perhaps off the wire) to an instance
                # of this enum type.
                # @param value [String] the actual value of the enum instance
                # @return [State] the instance found for the value, otherwise
                #         an unknown instance will be built for the value
                def from_string(value)
                    begin
                        const_get(value)
                    rescue NameError
                        State.new('UNKNOWN', value)
                    end
                end
            end

            private

            # Constructs a new instance.
            # @param value [String] the actual value of the enum instance
            # @param unknown [String] the unknown value when value is 'UKNOWN'
            def initialize(value, unknown=nil)
                super(self.class.binding_type, value, unknown)
            end

            public

            # @!attribute [rw] active
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     The session is active. Individual files may be in the process of being transferred and may become ready for download at different times.
            ACTIVE = State.new('ACTIVE')

            # @!attribute [rw] canceled
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     The session has been canceled. On-going downloads may fail. The session will stay in this state until it is either deleted by the user or automatically cleaned up by the Content Library Service.
            CANCELED = State.new('CANCELED')

            # @!attribute [rw] error
            #     @return [Com::Vmware::Content::Library::Item::DownloadSessionModel::State]
            #     Indicates there was an error during the session lifecycle.
            ERROR = State.new('ERROR')

        end

    end

## Class Method Details

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

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

Returns:

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

  the binding type

    1016
    1017
    1018
    1019
    1020
    1021
    1022
    1023
    1024
    1025
    1026
    1027
    1028
    1029
    1030
    1031
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item.rb', line 1016

    def binding_type
        @binding_type ||= VAPI::Bindings::StructType.new(
            'com.vmware.content.library.item.download_session_model',
            {
                'id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                'library_item_id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                'library_item_content_version' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
                'error_message' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Std::LocalizableMessage')),
                'client_progress' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                'state' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Content::Library::Item::DownloadSessionModel::State')),
                'expiration_time' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::DateTimeType.instance),
            },
            DownloadSessionModel,
            true,
            ["id"])
    end