Class: Jamf::Building

Inherits:
CollectionResource show all
Includes:
ChangeLog, Referable
Defined in:
lib/jamf/api/resources/collection_resources/building.rb

Overview

A building defined in the JSS

Constant Summary collapse

RSRC_VERSION =

Constants

'v1'.freeze
RSRC_PATH =
'buildings'.freeze
OBJECT_MODEL =

Object Model / Attributes See APIObject class documentation for details of how the OBJECT_MODEL hash works.

{

  # @!attribute [r] id
  #   @return [Integer]
  id: {
    class: :integer,
    identifier: :primary,
    readonly: true
  },

  # @!attribute name
  #   @return [String]
  name: {
    class: :string,
    identifier: true,
    validator: :non_empty_string,
    required: true
  },

  # @!attribute street1
  #   @return [String]
  streetAddress1: {
    class: :string
  },

  # @!attribute street2
  #   @return [String]
  streetAddress2: {
    class: :string
  },

  # @!attribute city
  #   @return [String]
  city: {
    class: :string
  },

  # @!attribute state_province
  #   @return [String]
  stateProvince: {
    class: :string,
    aliases: i[state province]
  },

  # @!attribute zip_postal_code
  #   @return [String]
  zipPostalCode: {
    class: :string,
    aliases: i[zip zipcode zip_code postal_code postalcode]
  },

  # @!attribute country
  #   @return [String]
  country: {
    class: :string
  }
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

This class inherits a constructor from Jamf::JSONObject

Instance Attribute Details

#cityString

Returns:



# File 'lib/jamf/api/resources/collection_resources/building.rb', line 83


#countryString

Returns:



# File 'lib/jamf/api/resources/collection_resources/building.rb', line 103


#idInteger (readonly)

Returns:

  • (Integer)


# File 'lib/jamf/api/resources/collection_resources/building.rb', line 54


#nameString

Returns:



# File 'lib/jamf/api/resources/collection_resources/building.rb', line 62


#state_provinceString

Returns:



# File 'lib/jamf/api/resources/collection_resources/building.rb', line 89


#street1String

Returns:



# File 'lib/jamf/api/resources/collection_resources/building.rb', line 71


#street2String

Returns:



# File 'lib/jamf/api/resources/collection_resources/building.rb', line 77


#zip_postal_codeString

Returns:



# File 'lib/jamf/api/resources/collection_resources/building.rb', line 96


Instance Method Details

#add_change_log_note(note, cnx: Jamf.cnx) ⇒ void Originally defined in module ChangeLog

This method returns an undefined value.

Add a note to this resource’s change log.

If the change history has been cached already, it is recached after adding the note.

Parameters:

  • note (String)

    The note to add. It cannot be empty.

#change_log(refresh = false, cnx: Jamf.cnx) ⇒ Array<Jamf::ChangeHistoryEntry> Originally defined in module ChangeLog

The change and note history for this resource.

The history is cached internally and only re-fetched when a truthy parameter is given.

Parameters:

  • refresh (Boolean) (defaults to: false)

    re-fetch and re-cache the history

Returns:

  • (Array<Jamf::ChangeHistoryEntry>)

    The change and note history for this resource

#referenceself.class::GenericReference Originally defined in module Referable

Returns A reference to this object.

Returns:

  • (self.class::GenericReference)

    A reference to this object.