Class: SSHAccountProvisionerConfigParam

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/account_provisioning_model_types.rb

Constant Summary collapse

NAME =
1
TYPE =
2
ISOPTIONAL =
3
DESCRIPTION =
4
FIELDS =
{
  NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
  TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :default =>     0, :enum_class => ::SSHAccountProvisionerConfigParamType},
  ISOPTIONAL => {:type => ::Thrift::Types::BOOL, :name => 'isOptional', :default => false},
  DESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'description', :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



30
# File 'lib/account_provisioning_model_types.rb', line 30

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


32
33
34
35
36
37
38
39
# File 'lib/account_provisioning_model_types.rb', line 32

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field isOptional is unset!') if @isOptional.nil?
  unless @type.nil? || ::SSHAccountProvisionerConfigParamType::VALID_VALUES.include?(@type)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
  end
end