class stcloud::App

Attributes

ajax_threshold[RW]
app_type[RW]
app_type_id[RW]
creator_email[RW]
credit_card_expiry[RW]
credit_card_number[RW]
description[RW]
display_status[RW]
first_data_saved_date[RW]
id[RW]
integration[RW]
last_data_received_date[RW]
last_data_saved_date[RW]
logged_in_user_app_role[RW]
monthly_invoice_account[RW]
name[RW]
owner_email[RW]
owning_organization[RW]
page_load_threshold[RW]
payment_method_id[RW]
plan[RW]
prepaid_account[RW]
read_token[RW]
read_write_token[RW]
registration_date[RW]
status[RW]
token[RW]
tokens[RW]
trial_end_date[RW]
url_group_limit[RW]
user_roles[RW]
write_token[RW]

Public Class Methods

attribute_map() click to toggle source

Attribute mapping from ruby-style variable name to JSON key.

# File lib/stcloud/models/app.rb, line 81
def self.attribute_map
  {
    :'ajax_threshold' => :'ajaxThreshold',
    :'app_type' => :'appType',
    :'app_type_id' => :'appTypeId',
    :'creator_email' => :'creatorEmail',
    :'credit_card_expiry' => :'creditCardExpiry',
    :'credit_card_number' => :'creditCardNumber',
    :'description' => :'description',
    :'display_status' => :'displayStatus',
    :'first_data_saved_date' => :'firstDataSavedDate',
    :'id' => :'id',
    :'integration' => :'integration',
    :'last_data_received_date' => :'lastDataReceivedDate',
    :'last_data_saved_date' => :'lastDataSavedDate',
    :'logged_in_user_app_role' => :'loggedInUserAppRole',
    :'monthly_invoice_account' => :'monthlyInvoiceAccount',
    :'name' => :'name',
    :'owner_email' => :'ownerEmail',
    :'owning_organization' => :'owningOrganization',
    :'page_load_threshold' => :'pageLoadThreshold',
    :'payment_method_id' => :'paymentMethodId',
    :'plan' => :'plan',
    :'prepaid_account' => :'prepaidAccount',
    :'read_token' => :'readToken',
    :'read_write_token' => :'readWriteToken',
    :'registration_date' => :'registrationDate',
    :'status' => :'status',
    :'token' => :'token',
    :'tokens' => :'tokens',
    :'trial_end_date' => :'trialEndDate',
    :'url_group_limit' => :'urlGroupLimit',
    :'user_roles' => :'userRoles',
    :'write_token' => :'writeToken'
  }
end
build_from_hash(attributes) click to toggle source

Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself

# File lib/stcloud/models/app.rb, line 377
def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

# File lib/stcloud/models/app.rb, line 164
def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `stcloud::App` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `stcloud::App`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'ajax_threshold')
    self.ajax_threshold = attributes[:'ajax_threshold']
  end

  if attributes.key?(:'app_type')
    self.app_type = attributes[:'app_type']
  end

  if attributes.key?(:'app_type_id')
    self.app_type_id = attributes[:'app_type_id']
  end

  if attributes.key?(:'creator_email')
    self.creator_email = attributes[:'creator_email']
  end

  if attributes.key?(:'credit_card_expiry')
    self.credit_card_expiry = attributes[:'credit_card_expiry']
  end

  if attributes.key?(:'credit_card_number')
    self.credit_card_number = attributes[:'credit_card_number']
  end

  if attributes.key?(:'description')
    self.description = attributes[:'description']
  end

  if attributes.key?(:'display_status')
    self.display_status = attributes[:'display_status']
  end

  if attributes.key?(:'first_data_saved_date')
    self.first_data_saved_date = attributes[:'first_data_saved_date']
  end

  if attributes.key?(:'id')
    self.id = attributes[:'id']
  end

  if attributes.key?(:'integration')
    self.integration = attributes[:'integration']
  end

  if attributes.key?(:'last_data_received_date')
    self.last_data_received_date = attributes[:'last_data_received_date']
  end

  if attributes.key?(:'last_data_saved_date')
    self.last_data_saved_date = attributes[:'last_data_saved_date']
  end

  if attributes.key?(:'logged_in_user_app_role')
    self.logged_in_user_app_role = attributes[:'logged_in_user_app_role']
  end

  if attributes.key?(:'monthly_invoice_account')
    self.monthly_invoice_account = attributes[:'monthly_invoice_account']
  end

  if attributes.key?(:'name')
    self.name = attributes[:'name']
  end

  if attributes.key?(:'owner_email')
    self.owner_email = attributes[:'owner_email']
  end

  if attributes.key?(:'owning_organization')
    self.owning_organization = attributes[:'owning_organization']
  end

  if attributes.key?(:'page_load_threshold')
    self.page_load_threshold = attributes[:'page_load_threshold']
  end

  if attributes.key?(:'payment_method_id')
    self.payment_method_id = attributes[:'payment_method_id']
  end

  if attributes.key?(:'plan')
    self.plan = attributes[:'plan']
  end

  if attributes.key?(:'prepaid_account')
    self.prepaid_account = attributes[:'prepaid_account']
  end

  if attributes.key?(:'read_token')
    self.read_token = attributes[:'read_token']
  end

  if attributes.key?(:'read_write_token')
    self.read_write_token = attributes[:'read_write_token']
  end

  if attributes.key?(:'registration_date')
    self.registration_date = attributes[:'registration_date']
  end

  if attributes.key?(:'status')
    self.status = attributes[:'status']
  end

  if attributes.key?(:'token')
    self.token = attributes[:'token']
  end

  if attributes.key?(:'tokens')
    if (value = attributes[:'tokens']).is_a?(Array)
      self.tokens = value
    end
  end

  if attributes.key?(:'trial_end_date')
    self.trial_end_date = attributes[:'trial_end_date']
  end

  if attributes.key?(:'url_group_limit')
    self.url_group_limit = attributes[:'url_group_limit']
  end

  if attributes.key?(:'user_roles')
    if (value = attributes[:'user_roles']).is_a?(Array)
      self.user_roles = value
    end
  end

  if attributes.key?(:'write_token')
    self.write_token = attributes[:'write_token']
  end
end
openapi_nullable() click to toggle source

List of attributes with nullable: true

# File lib/stcloud/models/app.rb, line 157
def self.openapi_nullable
  Set.new([
  ])
end
openapi_types() click to toggle source

Attribute type mapping.

# File lib/stcloud/models/app.rb, line 119
def self.openapi_types
  {
    :'ajax_threshold' => :'Object',
    :'app_type' => :'Object',
    :'app_type_id' => :'Object',
    :'creator_email' => :'Object',
    :'credit_card_expiry' => :'Object',
    :'credit_card_number' => :'Object',
    :'description' => :'Object',
    :'display_status' => :'Object',
    :'first_data_saved_date' => :'Object',
    :'id' => :'Object',
    :'integration' => :'Object',
    :'last_data_received_date' => :'Object',
    :'last_data_saved_date' => :'Object',
    :'logged_in_user_app_role' => :'Object',
    :'monthly_invoice_account' => :'Object',
    :'name' => :'Object',
    :'owner_email' => :'Object',
    :'owning_organization' => :'Object',
    :'page_load_threshold' => :'Object',
    :'payment_method_id' => :'Object',
    :'plan' => :'Object',
    :'prepaid_account' => :'Object',
    :'read_token' => :'Object',
    :'read_write_token' => :'Object',
    :'registration_date' => :'Object',
    :'status' => :'Object',
    :'token' => :'Object',
    :'tokens' => :'Object',
    :'trial_end_date' => :'Object',
    :'url_group_limit' => :'Object',
    :'user_roles' => :'Object',
    :'write_token' => :'Object'
  }
end

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# File lib/stcloud/models/app.rb, line 325
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      ajax_threshold == o.ajax_threshold &&
      app_type == o.app_type &&
      app_type_id == o.app_type_id &&
      creator_email == o.creator_email &&
      credit_card_expiry == o.credit_card_expiry &&
      credit_card_number == o.credit_card_number &&
      description == o.description &&
      display_status == o.display_status &&
      first_data_saved_date == o.first_data_saved_date &&
      id == o.id &&
      integration == o.integration &&
      last_data_received_date == o.last_data_received_date &&
      last_data_saved_date == o.last_data_saved_date &&
      logged_in_user_app_role == o.logged_in_user_app_role &&
      monthly_invoice_account == o.monthly_invoice_account &&
      name == o.name &&
      owner_email == o.owner_email &&
      owning_organization == o.owning_organization &&
      page_load_threshold == o.page_load_threshold &&
      payment_method_id == o.payment_method_id &&
      plan == o.plan &&
      prepaid_account == o.prepaid_account &&
      read_token == o.read_token &&
      read_write_token == o.read_write_token &&
      registration_date == o.registration_date &&
      status == o.status &&
      token == o.token &&
      tokens == o.tokens &&
      trial_end_date == o.trial_end_date &&
      url_group_limit == o.url_group_limit &&
      user_roles == o.user_roles &&
      write_token == o.write_token
end
_deserialize(type, value) click to toggle source

Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data

# File lib/stcloud/models/app.rb, line 407
def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    stcloud.const_get(type).build_from_hash(value)
  end
end
_to_hash(value) click to toggle source

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash

# File lib/stcloud/models/app.rb, line 476
def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end
build_from_hash(attributes) click to toggle source

Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself

# File lib/stcloud/models/app.rb, line 384
def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.openapi_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
      self.send("#{key}=", nil)
    end
  end

  self
end
eql?(o) click to toggle source

@see the `==` method @param [Object] Object to be compared

# File lib/stcloud/models/app.rb, line 364
def eql?(o)
  self == o
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Integer] Hash code

# File lib/stcloud/models/app.rb, line 370
def hash
  [ajax_threshold, app_type, app_type_id, creator_email, credit_card_expiry, credit_card_number, description, display_status, first_data_saved_date, id, integration, last_data_received_date, last_data_saved_date, logged_in_user_app_role, monthly_invoice_account, name, owner_email, owning_organization, page_load_threshold, payment_method_id, plan, prepaid_account, read_token, read_write_token, registration_date, status, token, tokens, trial_end_date, url_group_limit, user_roles, write_token].hash
end
list_invalid_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

# File lib/stcloud/models/app.rb, line 312
def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end
to_body() click to toggle source

to_body is an alias to to_hash (backward compatibility) @return [Hash] Returns the object in the form of hash

# File lib/stcloud/models/app.rb, line 452
def to_body
  to_hash
end
to_hash() click to toggle source

Returns the object in the form of hash @return [Hash] Returns the object in the form of hash

# File lib/stcloud/models/app.rb, line 458
def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end
to_s() click to toggle source

Returns the string representation of the object @return [String] String presentation of the object

# File lib/stcloud/models/app.rb, line 446
def to_s
  to_hash.to_s
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

# File lib/stcloud/models/app.rb, line 319
def valid?
  true
end