Class: Google::Apis::SolarV1::RoofSegmentSummary

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/solar_v1/classes.rb,
lib/google/apis/solar_v1/representations.rb,
lib/google/apis/solar_v1/representations.rb

Overview

Information about a roof segment on the building, with some number of panels placed on it.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RoofSegmentSummary

Returns a new instance of RoofSegmentSummary.



805
806
807
# File 'lib/google/apis/solar_v1/classes.rb', line 805

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#azimuth_degreesFloat

Compass direction the roof segment is pointing in. 0 = North, 90 = East, 180 = South. For a "flat" roof segment (pitch_degrees very near 0), azimuth is not well defined, so for consistency, we define it arbitrarily to be 0 (North). Corresponds to the JSON property azimuthDegrees

Returns:

  • (Float)


780
781
782
# File 'lib/google/apis/solar_v1/classes.rb', line 780

def azimuth_degrees
  @azimuth_degrees
end

#panels_countFixnum

The total number of panels on this segment. Corresponds to the JSON property panelsCount

Returns:

  • (Fixnum)


785
786
787
# File 'lib/google/apis/solar_v1/classes.rb', line 785

def panels_count
  @panels_count
end

#pitch_degreesFloat

Angle of the roof segment relative to the theoretical ground plane. 0 = parallel to the ground, 90 = perpendicular to the ground. Corresponds to the JSON property pitchDegrees

Returns:

  • (Float)


791
792
793
# File 'lib/google/apis/solar_v1/classes.rb', line 791

def pitch_degrees
  @pitch_degrees
end

#segment_indexFixnum

Index in roof_segment_stats of the corresponding RoofSegmentSizeAndSunshineStats. Corresponds to the JSON property segmentIndex

Returns:

  • (Fixnum)


797
798
799
# File 'lib/google/apis/solar_v1/classes.rb', line 797

def segment_index
  @segment_index
end

#yearly_energy_dc_kwhFloat

How much sunlight energy this part of the layout captures over the course of a year, in DC kWh, assuming the panels described above. Corresponds to the JSON property yearlyEnergyDcKwh

Returns:

  • (Float)


803
804
805
# File 'lib/google/apis/solar_v1/classes.rb', line 803

def yearly_energy_dc_kwh
  @yearly_energy_dc_kwh
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



810
811
812
813
814
815
816
# File 'lib/google/apis/solar_v1/classes.rb', line 810

def update!(**args)
  @azimuth_degrees = args[:azimuth_degrees] if args.key?(:azimuth_degrees)
  @panels_count = args[:panels_count] if args.key?(:panels_count)
  @pitch_degrees = args[:pitch_degrees] if args.key?(:pitch_degrees)
  @segment_index = args[:segment_index] if args.key?(:segment_index)
  @yearly_energy_dc_kwh = args[:yearly_energy_dc_kwh] if args.key?(:yearly_energy_dc_kwh)
end