Class: Google::Apis::SolarV1::SolarPanel

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

SolarPanel describes the position, orientation, and production of a single solar panel. See the panel_height_meters, panel_width_meters, and panel_capacity_watts fields in SolarPotential for information on the parameters of the panel.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SolarPanel

Returns a new instance of SolarPanel.



937
938
939
# File 'lib/google/apis/solar_v1/classes.rb', line 937

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

Instance Attribute Details

#centerGoogle::Apis::SolarV1::LatLng

An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. Corresponds to the JSON property center



918
919
920
# File 'lib/google/apis/solar_v1/classes.rb', line 918

def center
  @center
end

#orientationString

The orientation of the panel. Corresponds to the JSON property orientation

Returns:

  • (String)


923
924
925
# File 'lib/google/apis/solar_v1/classes.rb', line 923

def orientation
  @orientation
end

#segment_indexFixnum

Index in roof_segment_stats of the RoofSegmentSizeAndSunshineStats which corresponds to the roof segment that this panel is placed on. Corresponds to the JSON property segmentIndex

Returns:

  • (Fixnum)


929
930
931
# File 'lib/google/apis/solar_v1/classes.rb', line 929

def segment_index
  @segment_index
end

#yearly_energy_dc_kwhFloat

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

Returns:

  • (Float)


935
936
937
# File 'lib/google/apis/solar_v1/classes.rb', line 935

def yearly_energy_dc_kwh
  @yearly_energy_dc_kwh
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



942
943
944
945
946
947
# File 'lib/google/apis/solar_v1/classes.rb', line 942

def update!(**args)
  @center = args[:center] if args.key?(:center)
  @orientation = args[:orientation] if args.key?(:orientation)
  @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