solar

package
v0.174.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: BSD-3-Clause Imports: 16 Imported by: 1

Documentation

Overview

Package solar provides access to the Solar API.

For product documentation, see: https://developers.google.com/maps/documentation/solar

Library status

These client libraries are officially supported by Google. However, this library is considered complete and is in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features.

When possible, we recommend using our newer [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) that are still actively being worked and iterated on.

Creating a client

Usage example:

import "google.golang.org/api/solar/v1"
...
ctx := context.Background()
solarService, err := solar.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication. For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

To use an API key for authentication (note: some APIs do not support API keys), use google.golang.org/api/option.WithAPIKey:

solarService, err := solar.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow, use google.golang.org/api/option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
solarService, err := solar.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See google.golang.org/api/option.ClientOption for details on options.

Index

Constants

View Source
const (
	// See, edit, configure, and delete your Google Cloud data and see the
	// email address for your Google Account.
	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildingInsights

type BuildingInsights struct {
	// AdministrativeArea: Administrative area 1 (e.g., in the US, the
	// state) that contains this building. For example, in the US, the
	// abbreviation might be "MA" or "CA."
	AdministrativeArea string `json:"administrativeArea,omitempty"`

	// BoundingBox: The bounding box of the building.
	BoundingBox *LatLngBox `json:"boundingBox,omitempty"`

	// Center: A point near the center of the building.
	Center *LatLng `json:"center,omitempty"`

	// ImageryDate: Date that the underlying imagery was acquired. This is
	// approximate.
	ImageryDate *Date `json:"imageryDate,omitempty"`

	// ImageryProcessedDate: When processing was completed on this imagery.
	ImageryProcessedDate *Date `json:"imageryProcessedDate,omitempty"`

	// ImageryQuality: The quality of the imagery used to compute the data
	// for this building.
	//
	// Possible values:
	//   "IMAGERY_QUALITY_UNSPECIFIED" - No quality is known.
	//   "HIGH" - The underlying imagery and DSM data were processed at 0.1
	// m/pixel.
	//   "MEDIUM" - The underlying imagery and DSM data were processed at
	// 0.25 m/pixel.
	//   "LOW" - The underlying imagery and DSM data were processed at 0.5
	// m/pixel.
	ImageryQuality string `json:"imageryQuality,omitempty"`

	// Name: The resource name for the building, of the format `building/`.
	Name string `json:"name,omitempty"`

	// PostalCode: Postal code (e.g., US zip code) this building is
	// contained by.
	PostalCode string `json:"postalCode,omitempty"`

	// RegionCode: Region code for the country (or region) this building is
	// in.
	RegionCode string `json:"regionCode,omitempty"`

	// SolarPotential: Solar potential of the building.
	SolarPotential *SolarPotential `json:"solarPotential,omitempty"`

	// StatisticalArea: Statistical area (e.g., US census tract) this
	// building is in.
	StatisticalArea string `json:"statisticalArea,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "AdministrativeArea")
	// to unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AdministrativeArea") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

BuildingInsights: Response message for `Solar.FindClosestBuildingInsights`. Information about the location, dimensions, and solar potential of a building.

func (*BuildingInsights) MarshalJSON

func (s *BuildingInsights) MarshalJSON() ([]byte, error)

type BuildingInsightsFindClosestCall

type BuildingInsightsFindClosestCall struct {
	// contains filtered or unexported fields
}

func (*BuildingInsightsFindClosestCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*BuildingInsightsFindClosestCall) Do

Do executes the "solar.buildingInsights.findClosest" call. Exactly one of *BuildingInsights or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *BuildingInsights.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*BuildingInsightsFindClosestCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*BuildingInsightsFindClosestCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*BuildingInsightsFindClosestCall) IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*BuildingInsightsFindClosestCall) LocationLatitude

func (c *BuildingInsightsFindClosestCall) LocationLatitude(locationLatitude float64) *BuildingInsightsFindClosestCall

LocationLatitude sets the optional parameter "location.latitude": The latitude in degrees. It must be in the range [-90.0, +90.0].

func (*BuildingInsightsFindClosestCall) LocationLongitude

func (c *BuildingInsightsFindClosestCall) LocationLongitude(locationLongitude float64) *BuildingInsightsFindClosestCall

LocationLongitude sets the optional parameter "location.longitude": The longitude in degrees. It must be in the range [-180.0, +180.0].

func (*BuildingInsightsFindClosestCall) RequiredQuality

func (c *BuildingInsightsFindClosestCall) RequiredQuality(requiredQuality string) *BuildingInsightsFindClosestCall

RequiredQuality sets the optional parameter "requiredQuality": The minimum quality level allowed in the results. No result with lower quality than this will be returned. Not specifying this is equivalent to restricting to HIGH quality only.

Possible values:

"IMAGERY_QUALITY_UNSPECIFIED" - No quality is known.
"HIGH" - The underlying imagery and DSM data were processed at 0.1

m/pixel.

"MEDIUM" - The underlying imagery and DSM data were processed at

0.25 m/pixel.

"LOW" - The underlying imagery and DSM data were processed at 0.5

m/pixel.

type BuildingInsightsService

type BuildingInsightsService struct {
	// contains filtered or unexported fields
}

func NewBuildingInsightsService

func NewBuildingInsightsService(s *Service) *BuildingInsightsService

func (*BuildingInsightsService) FindClosest

FindClosest: Locates the closest building to a query point. Returns an error with code `NOT_FOUND` if there are no buildings within approximately 50m of the query point.

type CashPurchaseSavings

type CashPurchaseSavings struct {
	// OutOfPocketCost: Initial cost before tax incentives: the amount that
	// must be paid out-of-pocket. Contrast with `upfront_cost`, which is
	// after tax incentives.
	OutOfPocketCost *Money `json:"outOfPocketCost,omitempty"`

	// PaybackYears: Number of years until payback occurs. A negative value
	// means payback never occurs within the lifetime period.
	PaybackYears float64 `json:"paybackYears,omitempty"`

	// RebateValue: The value of all tax rebates.
	RebateValue *Money `json:"rebateValue,omitempty"`

	// Savings: How much is saved (or not) over the lifetime period.
	Savings *SavingsOverTime `json:"savings,omitempty"`

	// UpfrontCost: Initial cost after tax incentives: it's the amount that
	// must be paid during first year. Contrast with `out_of_pocket_cost`,
	// which is before tax incentives.
	UpfrontCost *Money `json:"upfrontCost,omitempty"`

	// ForceSendFields is a list of field names (e.g. "OutOfPocketCost") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "OutOfPocketCost") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

CashPurchaseSavings: Cost and benefit of an outright purchase of a particular configuration of solar panels with a particular electricity usage.

func (*CashPurchaseSavings) MarshalJSON

func (s *CashPurchaseSavings) MarshalJSON() ([]byte, error)

func (*CashPurchaseSavings) UnmarshalJSON

func (s *CashPurchaseSavings) UnmarshalJSON(data []byte) error

type DataLayers

type DataLayers struct {
	// AnnualFluxUrl: The URL for the annual flux map (annual sunlight on
	// roofs) of the region. Values are kWh/kW/year. This is *unmasked
	// flux*: flux is computed for every location, not just building
	// rooftops. Invalid locations are stored as -9999: locations outside
	// our coverage area will be invalid, and a few locations inside the
	// coverage area, where we were unable to calculate flux, will also be
	// invalid.
	AnnualFluxUrl string `json:"annualFluxUrl,omitempty"`

	// DsmUrl: The URL for an image of the DSM (Digital Surface Model) of
	// the region. Values are in meters above EGM96 geoid (i.e., sea level).
	// Invalid locations (where we don't have data) are stored as -9999.
	DsmUrl string `json:"dsmUrl,omitempty"`

	// HourlyShadeUrls: Twelve URLs for hourly shade, corresponding to
	// January...December, in order. Each GeoTIFF will contain 24 bands,
	// corresponding to the 24 hours of the day. Each pixel is a 32 bit
	// integer, corresponding to the (up to) 31 days of that month; a 1 bit
	// means that the corresponding location is able to see the sun at that
	// day, of that hour, of that month. Invalid locations are stored as
	// -9999 (since this is negative, it has bit 31 set, and no valid value
	// could have bit 31 set as that would correspond to the 32nd day of the
	// month). An example may be useful. If you want to know whether a point
	// (at pixel location (x, y)) saw sun at 4pm on the 22nd of June you
	// would: 1. fetch the sixth URL in this list (corresponding to June).
	// 1. look up the 17th channel (corresponding to 4pm). 1. read the
	// 32-bit value at (x, y). 1. read bit 21 of the value (corresponding to
	// the 22nd of the month). 1. if that bit is a 1, then that spot saw the
	// sun at 4pm 22 June. More formally: Given `month` (1-12), `day`
	// (1...month max; February has 28 days) and `hour` (0-23), the
	// shade/sun for that month/day/hour at a position `(x, y)` is the bit
	// “` (hourly_shade[month - 1])(x, y)[hour] & (1 << (day - 1)) “`
	// where `(x, y)` is spatial indexing, `[month - 1]` refers to fetching
	// the `month - 1`st URL (indexing from zero), `[hour]` is indexing into
	// the channels, and a final non-zero result means "sunny". There are no
	// leap days, and DST doesn't exist (all days are 24 hours long; noon is
	// always "standard time" noon).
	HourlyShadeUrls []string `json:"hourlyShadeUrls,omitempty"`

	// ImageryDate: When the source imagery (from which all the other data
	// are derived) in this region was taken. It is necessarily somewhat
	// approximate, as the images may have been taken over more than one
	// day.
	ImageryDate *Date `json:"imageryDate,omitempty"`

	// ImageryProcessedDate: When processing was completed on this imagery.
	ImageryProcessedDate *Date `json:"imageryProcessedDate,omitempty"`

	// ImageryQuality: The quality of the result's imagery.
	//
	// Possible values:
	//   "IMAGERY_QUALITY_UNSPECIFIED" - No quality is known.
	//   "HIGH" - The underlying imagery and DSM data were processed at 0.1
	// m/pixel.
	//   "MEDIUM" - The underlying imagery and DSM data were processed at
	// 0.25 m/pixel.
	//   "LOW" - The underlying imagery and DSM data were processed at 0.5
	// m/pixel.
	ImageryQuality string `json:"imageryQuality,omitempty"`

	// MaskUrl: The URL for the building mask image: one bit per pixel
	// saying whether that pixel is considered to be part of a rooftop or
	// not.
	MaskUrl string `json:"maskUrl,omitempty"`

	// MonthlyFluxUrl: The URL for the monthly flux map (sunlight on roofs,
	// broken down by month) of the region. Values are kWh/kW/year. The
	// GeoTIFF pointed to by this URL will contain twelve bands,
	// corresponding to January...December, in order.
	MonthlyFluxUrl string `json:"monthlyFluxUrl,omitempty"`

	// RgbUrl: The URL for an image of RGB data (aerial photo) of the
	// region.
	RgbUrl string `json:"rgbUrl,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "AnnualFluxUrl") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AnnualFluxUrl") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

DataLayers: Information about the solar potential of a region. The actual data are contained in a number of GeoTIFF files covering the requested region, for which this message contains URLs: Each string in the `DataLayers` message contains a URL from which the corresponding GeoTIFF can be fetched. These URLs are valid for a few hours after they've been generated. Most of the GeoTIFF files are at a resolution of 0.1m/pixel, but the monthly flux file is at 0.5m/pixel, and the hourly shade files are at 1m/pixel. If a `pixel_size_meters` value was specified in the `GetDataLayersRequest`, then the minimum resolution in the GeoTIFF files will be that value.

func (*DataLayers) MarshalJSON

func (s *DataLayers) MarshalJSON() ([]byte, error)

type DataLayersGetCall

type DataLayersGetCall struct {
	// contains filtered or unexported fields
}

func (*DataLayersGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*DataLayersGetCall) Do

Do executes the "solar.dataLayers.get" call. Exactly one of *DataLayers or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *DataLayers.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*DataLayersGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*DataLayersGetCall) Header

func (c *DataLayersGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*DataLayersGetCall) IfNoneMatch

func (c *DataLayersGetCall) IfNoneMatch(entityTag string) *DataLayersGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*DataLayersGetCall) LocationLatitude

func (c *DataLayersGetCall) LocationLatitude(locationLatitude float64) *DataLayersGetCall

LocationLatitude sets the optional parameter "location.latitude": The latitude in degrees. It must be in the range [-90.0, +90.0].

func (*DataLayersGetCall) LocationLongitude

func (c *DataLayersGetCall) LocationLongitude(locationLongitude float64) *DataLayersGetCall

LocationLongitude sets the optional parameter "location.longitude": The longitude in degrees. It must be in the range [-180.0, +180.0].

func (*DataLayersGetCall) PixelSizeMeters

func (c *DataLayersGetCall) PixelSizeMeters(pixelSizeMeters float64) *DataLayersGetCall

PixelSizeMeters sets the optional parameter "pixelSizeMeters": The minimum scale, in meters per pixel, of the data to return. Values of 0.1 (the default, if this field is not set explicitly), 0.25, 0.5, and 1.0 are supported. Imagery components whose normal resolution is less than `pixel_size_meters` will be returned at the resolution specified by `pixel_size_meters`; imagery components whose normal resolution is equal to or greater than `pixel_size_meters` will be returned at that normal resolution.

func (*DataLayersGetCall) RadiusMeters

func (c *DataLayersGetCall) RadiusMeters(radiusMeters float64) *DataLayersGetCall

RadiusMeters sets the optional parameter "radiusMeters": Required. The radius, in meters, defining the region surrounding that centre point for which data should be returned. The limitations on this value are: * Any value up to 100m can always be specified. * Values over 100m can be specified, as long as `radius_meters` <= `pixel_size_meters * 1000`. * However, for values over 175m, the `DataLayerView` in the request must not include monthly flux or hourly shade.

func (*DataLayersGetCall) RequiredQuality

func (c *DataLayersGetCall) RequiredQuality(requiredQuality string) *DataLayersGetCall

RequiredQuality sets the optional parameter "requiredQuality": The minimum quality level allowed in the results. No result with lower quality than this will be returned. Not specifying this is equivalent to restricting to HIGH quality only.

Possible values:

"IMAGERY_QUALITY_UNSPECIFIED" - No quality is known.
"HIGH" - The underlying imagery and DSM data were processed at 0.1

m/pixel.

"MEDIUM" - The underlying imagery and DSM data were processed at

0.25 m/pixel.

"LOW" - The underlying imagery and DSM data were processed at 0.5

m/pixel.

func (*DataLayersGetCall) View

View sets the optional parameter "view": The desired subset of the data to return.

Possible values:

"DATA_LAYER_VIEW_UNSPECIFIED" - Equivalent to FULL.
"DSM_LAYER" - Get the DSM only.
"IMAGERY_LAYERS" - Get the DSM, RGB, and mask.
"IMAGERY_AND_ANNUAL_FLUX_LAYERS" - Get the DSM, RGB, mask, and

annual flux.

"IMAGERY_AND_ALL_FLUX_LAYERS" - Get the DSM, RGB, mask, annual

flux, and monthly flux.

"FULL_LAYERS" - Get all data.

type DataLayersService

type DataLayersService struct {
	// contains filtered or unexported fields
}

func NewDataLayersService

func NewDataLayersService(s *Service) *DataLayersService

func (*DataLayersService) Get

Get: Gets solar information for a region surrounding a location. Returns an error with code `NOT_FOUND` if the location is outside the coverage area.

type Date

type Date struct {
	// Day: Day of a month. Must be from 1 to 31 and valid for the year and
	// month, or 0 to specify a year by itself or a year and month where the
	// day isn't significant.
	Day int64 `json:"day,omitempty"`

	// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year
	// without a month and day.
	Month int64 `json:"month,omitempty"`

	// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a
	// date without a year.
	Year int64 `json:"year,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Day") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Day") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Date: Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp

func (*Date) MarshalJSON

func (s *Date) MarshalJSON() ([]byte, error)

type FinancedPurchaseSavings

type FinancedPurchaseSavings struct {
	// AnnualLoanPayment: Annual loan payments.
	AnnualLoanPayment *Money `json:"annualLoanPayment,omitempty"`

	// LoanInterestRate: The interest rate on loans assumed in this set of
	// calculations.
	LoanInterestRate float64 `json:"loanInterestRate,omitempty"`

	// RebateValue: The value of all tax rebates (including Federal
	// Investment Tax Credit (ITC)).
	RebateValue *Money `json:"rebateValue,omitempty"`

	// Savings: How much is saved (or not) over the lifetime period.
	Savings *SavingsOverTime `json:"savings,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AnnualLoanPayment")
	// to unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AnnualLoanPayment") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

FinancedPurchaseSavings: Cost and benefit of using a loan to buy a particular configuration of solar panels with a particular electricity usage.

func (*FinancedPurchaseSavings) MarshalJSON

func (s *FinancedPurchaseSavings) MarshalJSON() ([]byte, error)

func (*FinancedPurchaseSavings) UnmarshalJSON

func (s *FinancedPurchaseSavings) UnmarshalJSON(data []byte) error

type FinancialAnalysis

type FinancialAnalysis struct {
	// AverageKwhPerMonth: How much electricity the house uses in an average
	// month, based on the bill size and the local electricity rates.
	AverageKwhPerMonth float64 `json:"averageKwhPerMonth,omitempty"`

	// CashPurchaseSavings: Cost and benefit of buying the solar panels with
	// cash.
	CashPurchaseSavings *CashPurchaseSavings `json:"cashPurchaseSavings,omitempty"`

	// DefaultBill: Whether this is the bill size selected to be the default
	// bill for the area this building is in. Exactly one
	// `FinancialAnalysis` in `BuildingSolarPotential` should have
	// `default_bill` set.
	DefaultBill bool `json:"defaultBill,omitempty"`

	// FinancedPurchaseSavings: Cost and benefit of buying the solar panels
	// by financing the purchase.
	FinancedPurchaseSavings *FinancedPurchaseSavings `json:"financedPurchaseSavings,omitempty"`

	// FinancialDetails: Financial information that applies regardless of
	// the financing method used.
	FinancialDetails *FinancialDetails `json:"financialDetails,omitempty"`

	// LeasingSavings: Cost and benefit of leasing the solar panels.
	LeasingSavings *LeasingSavings `json:"leasingSavings,omitempty"`

	// MonthlyBill: The monthly electric bill this analysis assumes.
	MonthlyBill *Money `json:"monthlyBill,omitempty"`

	// PanelConfigIndex: Index in solar_panel_configs of the optimum solar
	// layout for this bill size. This can be -1 indicating that there is no
	// layout. In this case, the remaining submessages will be omitted.
	PanelConfigIndex int64 `json:"panelConfigIndex,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AverageKwhPerMonth")
	// to unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AverageKwhPerMonth") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

FinancialAnalysis: Analysis of the cost and benefits of the optimum solar layout for a particular electric bill size.

func (*FinancialAnalysis) MarshalJSON

func (s *FinancialAnalysis) MarshalJSON() ([]byte, error)

func (*FinancialAnalysis) UnmarshalJSON

func (s *FinancialAnalysis) UnmarshalJSON(data []byte) error

type FinancialDetails

type FinancialDetails struct {
	// CostOfElectricityWithoutSolar: Total cost of electricity the user
	// would have paid over the lifetime period if they didn't install
	// solar.
	CostOfElectricityWithoutSolar *Money `json:"costOfElectricityWithoutSolar,omitempty"`

	// FederalIncentive: Amount of money available from federal incentives;
	// this applies if the user buys (with or without a loan) the panels.
	FederalIncentive *Money `json:"federalIncentive,omitempty"`

	// InitialAcKwhPerYear: How many AC kWh we think the solar panels will
	// generate in their first year.
	InitialAcKwhPerYear float64 `json:"initialAcKwhPerYear,omitempty"`

	// LifetimeSrecTotal: Amount of money the user will receive from Solar
	// Renewable Energy Credits over the panel lifetime; this applies if the
	// user buys (with or without a loan) the panels.
	LifetimeSrecTotal *Money `json:"lifetimeSrecTotal,omitempty"`

	// NetMeteringAllowed: Whether net metering is allowed.
	NetMeteringAllowed bool `json:"netMeteringAllowed,omitempty"`

	// PercentageExportedToGrid: The percentage (0-100) of solar electricity
	// production we assumed was exported to the grid, based on the first
	// quarter of production. This affects the calculations if net metering
	// is not allowed.
	PercentageExportedToGrid float64 `json:"percentageExportedToGrid,omitempty"`

	// RemainingLifetimeUtilityBill: Utility bill for electricity not
	// produced by solar, for the lifetime of the panels.
	RemainingLifetimeUtilityBill *Money `json:"remainingLifetimeUtilityBill,omitempty"`

	// SolarPercentage: Percentage (0-100) of the user's power supplied by
	// solar. Valid for the first year but approximately correct for future
	// years.
	SolarPercentage float64 `json:"solarPercentage,omitempty"`

	// StateIncentive: Amount of money available from state incentives; this
	// applies if the user buys (with or without a loan) the panels.
	StateIncentive *Money `json:"stateIncentive,omitempty"`

	// UtilityIncentive: Amount of money available from utility incentives;
	// this applies if the user buys (with or without a loan) the panels.
	UtilityIncentive *Money `json:"utilityIncentive,omitempty"`

	// ForceSendFields is a list of field names (e.g.
	// "CostOfElectricityWithoutSolar") to unconditionally include in API
	// requests. By default, fields with empty or default values are omitted
	// from API requests. However, any non-pointer, non-interface field
	// appearing in ForceSendFields will be sent to the server regardless of
	// whether the field is empty or not. This may be used to include empty
	// fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g.
	// "CostOfElectricityWithoutSolar") to include in API requests with the
	// JSON null value. By default, fields with empty values are omitted
	// from API requests. However, any field with an empty value appearing
	// in NullFields will be sent to the server as null. It is an error if a
	// field in this list has a non-empty value. This may be used to include
	// null fields in Patch requests.
	NullFields []string `json:"-"`
}

FinancialDetails: Details of a financial analysis. Some of these details are already stored at higher levels (e.g., out of pocket cost). Total money amounts are over a lifetime period defined by the panel_lifetime_years field in SolarPotential. Note: The out of pocket cost of purchasing the panels is given in the out_of_pocket_cost field in CashPurchaseSavings.

func (*FinancialDetails) MarshalJSON

func (s *FinancialDetails) MarshalJSON() ([]byte, error)

func (*FinancialDetails) UnmarshalJSON

func (s *FinancialDetails) UnmarshalJSON(data []byte) error

type GeoTiffGetCall

type GeoTiffGetCall struct {
	// contains filtered or unexported fields
}

func (*GeoTiffGetCall) Context

func (c *GeoTiffGetCall) Context(ctx context.Context) *GeoTiffGetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*GeoTiffGetCall) Do

func (c *GeoTiffGetCall) Do(opts ...googleapi.CallOption) (*HttpBody, error)

Do executes the "solar.geoTiff.get" call. Exactly one of *HttpBody or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *HttpBody.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*GeoTiffGetCall) Fields

func (c *GeoTiffGetCall) Fields(s ...googleapi.Field) *GeoTiffGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*GeoTiffGetCall) Header

func (c *GeoTiffGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*GeoTiffGetCall) Id

Id sets the optional parameter "id": Required. The ID of the asset being requested.

func (*GeoTiffGetCall) IfNoneMatch

func (c *GeoTiffGetCall) IfNoneMatch(entityTag string) *GeoTiffGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type GeoTiffService

type GeoTiffService struct {
	// contains filtered or unexported fields
}

func NewGeoTiffService

func NewGeoTiffService(s *Service) *GeoTiffService

func (*GeoTiffService) Get

func (r *GeoTiffService) Get() *GeoTiffGetCall

Get: Returns an image by its ID.

type HttpBody

type HttpBody struct {
	// ContentType: The HTTP Content-Type header value specifying the
	// content type of the body.
	ContentType string `json:"contentType,omitempty"`

	// Data: The HTTP request/response body as raw binary.
	Data string `json:"data,omitempty"`

	// Extensions: Application specific response metadata. Must be set in
	// the first response for streaming APIs.
	Extensions []googleapi.RawMessage `json:"extensions,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "ContentType") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ContentType") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

HttpBody: Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.

func (*HttpBody) MarshalJSON

func (s *HttpBody) MarshalJSON() ([]byte, error)

type LatLng

type LatLng struct {
	// Latitude: The latitude in degrees. It must be in the range [-90.0,
	// +90.0].
	Latitude float64 `json:"latitude,omitempty"`

	// Longitude: The longitude in degrees. It must be in the range [-180.0,
	// +180.0].
	Longitude float64 `json:"longitude,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Latitude") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Latitude") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

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.

func (*LatLng) MarshalJSON

func (s *LatLng) MarshalJSON() ([]byte, error)

func (*LatLng) UnmarshalJSON

func (s *LatLng) UnmarshalJSON(data []byte) error

type LatLngBox

type LatLngBox struct {
	// Ne: The northeast corner of the box.
	Ne *LatLng `json:"ne,omitempty"`

	// Sw: The southwest corner of the box.
	Sw *LatLng `json:"sw,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Ne") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Ne") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

LatLngBox: A bounding box in lat/lng coordinates.

func (*LatLngBox) MarshalJSON

func (s *LatLngBox) MarshalJSON() ([]byte, error)

type LeasingSavings

type LeasingSavings struct {
	// AnnualLeasingCost: Estimated annual leasing cost.
	AnnualLeasingCost *Money `json:"annualLeasingCost,omitempty"`

	// LeasesAllowed: Whether leases are allowed in this juristiction
	// (leases are not allowed in some states). If this field is false, then
	// the values in this message should probably be ignored.
	LeasesAllowed bool `json:"leasesAllowed,omitempty"`

	// LeasesSupported: Whether leases are supported in this juristiction by
	// the financial calculation engine. If this field is false, then the
	// values in this message should probably be ignored. This is
	// independent of `leases_allowed`: in some areas leases are allowed,
	// but under conditions that aren't handled by the financial models.
	LeasesSupported bool `json:"leasesSupported,omitempty"`

	// Savings: How much is saved (or not) over the lifetime period.
	Savings *SavingsOverTime `json:"savings,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AnnualLeasingCost")
	// to unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AnnualLeasingCost") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

LeasingSavings: Cost and benefit of leasing a particular configuration of solar panels with a particular electricity usage.

func (*LeasingSavings) MarshalJSON

func (s *LeasingSavings) MarshalJSON() ([]byte, error)

type Money

type Money struct {
	// CurrencyCode: The three-letter currency code defined in ISO 4217.
	CurrencyCode string `json:"currencyCode,omitempty"`

	// Nanos: Number of nano (10^-9) units of the amount. The value must be
	// between -999,999,999 and +999,999,999 inclusive. If `units` is
	// positive, `nanos` must be positive or zero. If `units` is zero,
	// `nanos` can be positive, zero, or negative. If `units` is negative,
	// `nanos` must be negative or zero. For example $-1.75 is represented
	// as `units`=-1 and `nanos`=-750,000,000.
	Nanos int64 `json:"nanos,omitempty"`

	// Units: The whole units of the amount. For example if `currencyCode`
	// is "USD", then 1 unit is one US dollar.
	Units int64 `json:"units,omitempty,string"`

	// ForceSendFields is a list of field names (e.g. "CurrencyCode") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "CurrencyCode") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Money: Represents an amount of money with its currency type.

func (*Money) MarshalJSON

func (s *Money) MarshalJSON() ([]byte, error)

type RoofSegmentSizeAndSunshineStats

type RoofSegmentSizeAndSunshineStats struct {
	// AzimuthDegrees: 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).
	AzimuthDegrees float64 `json:"azimuthDegrees,omitempty"`

	// BoundingBox: The bounding box of the roof segment.
	BoundingBox *LatLngBox `json:"boundingBox,omitempty"`

	// Center: A point near the center of the roof segment.
	Center *LatLng `json:"center,omitempty"`

	// PitchDegrees: Angle of the roof segment relative to the theoretical
	// ground plane. 0 = parallel to the ground, 90 = perpendicular to the
	// ground.
	PitchDegrees float64 `json:"pitchDegrees,omitempty"`

	// PlaneHeightAtCenterMeters: The height of the roof segment plane, in
	// meters above sea level, at the point designated by `center`. Together
	// with the pitch, azimuth, and center location, this fully defines the
	// roof segment plane.
	PlaneHeightAtCenterMeters float64 `json:"planeHeightAtCenterMeters,omitempty"`

	// Stats: Total size and sunlight quantiles for the roof segment.
	Stats *SizeAndSunshineStats `json:"stats,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AzimuthDegrees") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AzimuthDegrees") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

RoofSegmentSizeAndSunshineStats: Information about the size and sunniness quantiles of a roof segment.

func (*RoofSegmentSizeAndSunshineStats) MarshalJSON

func (s *RoofSegmentSizeAndSunshineStats) MarshalJSON() ([]byte, error)

func (*RoofSegmentSizeAndSunshineStats) UnmarshalJSON

func (s *RoofSegmentSizeAndSunshineStats) UnmarshalJSON(data []byte) error

type RoofSegmentSummary

type RoofSegmentSummary struct {
	// AzimuthDegrees: 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).
	AzimuthDegrees float64 `json:"azimuthDegrees,omitempty"`

	// PanelsCount: The total number of panels on this segment.
	PanelsCount int64 `json:"panelsCount,omitempty"`

	// PitchDegrees: Angle of the roof segment relative to the theoretical
	// ground plane. 0 = parallel to the ground, 90 = perpendicular to the
	// ground.
	PitchDegrees float64 `json:"pitchDegrees,omitempty"`

	// SegmentIndex: Index in roof_segment_stats of the corresponding
	// `RoofSegmentSizeAndSunshineStats`.
	SegmentIndex int64 `json:"segmentIndex,omitempty"`

	// YearlyEnergyDcKwh: How much sunlight energy this part of the layout
	// captures over the course of a year, in DC kWh, assuming the panels
	// described above.
	YearlyEnergyDcKwh float64 `json:"yearlyEnergyDcKwh,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AzimuthDegrees") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AzimuthDegrees") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

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

func (*RoofSegmentSummary) MarshalJSON

func (s *RoofSegmentSummary) MarshalJSON() ([]byte, error)

func (*RoofSegmentSummary) UnmarshalJSON

func (s *RoofSegmentSummary) UnmarshalJSON(data []byte) error

type SavingsOverTime

type SavingsOverTime struct {
	// FinanciallyViable: Indicates whether this scenario is financially
	// viable. Will be false for scenarios with poor financial viability
	// (e.g., money-losing).
	FinanciallyViable bool `json:"financiallyViable,omitempty"`

	// PresentValueOfSavingsLifetime: Using the assumed discount rate, what
	// is the present value of the cumulative lifetime savings?
	PresentValueOfSavingsLifetime *Money `json:"presentValueOfSavingsLifetime,omitempty"`

	// PresentValueOfSavingsYear20: Using the assumed discount rate, what is
	// the present value of the cumulative 20-year savings?
	PresentValueOfSavingsYear20 *Money `json:"presentValueOfSavingsYear20,omitempty"`

	// SavingsLifetime: Savings in the entire panel lifetime.
	SavingsLifetime *Money `json:"savingsLifetime,omitempty"`

	// SavingsYear1: Savings in the first year after panel installation.
	SavingsYear1 *Money `json:"savingsYear1,omitempty"`

	// SavingsYear20: Savings in the first twenty years after panel
	// installation.
	SavingsYear20 *Money `json:"savingsYear20,omitempty"`

	// ForceSendFields is a list of field names (e.g. "FinanciallyViable")
	// to unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "FinanciallyViable") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

SavingsOverTime: Financial information that's shared between different financing methods.

func (*SavingsOverTime) MarshalJSON

func (s *SavingsOverTime) MarshalJSON() ([]byte, error)

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	BuildingInsights *BuildingInsightsService

	DataLayers *DataLayersService

	GeoTiff *GeoTiffService
	// contains filtered or unexported fields
}

func New deprecated

func New(client *http.Client) (*Service, error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

func NewService

func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)

NewService creates a new Service.

type SizeAndSunshineStats

type SizeAndSunshineStats struct {
	// AreaMeters2: The area of the roof or roof segment, in m^2. This is
	// the roof area (accounting for tilt), not the ground footprint area.
	AreaMeters2 float64 `json:"areaMeters2,omitempty"`

	// GroundAreaMeters2: The ground footprint area covered by the roof or
	// roof segment, in m^2.
	GroundAreaMeters2 float64 `json:"groundAreaMeters2,omitempty"`

	// SunshineQuantiles: Quantiles of the pointwise sunniness across the
	// area. If there are N values here, this represents the (N-1)-iles. For
	// example, if there are 5 values, then they would be the quartiles
	// (min, 25%, 50%, 75%, max). Values are in annual kWh/kW like
	// max_sunshine_hours_per_year.
	SunshineQuantiles []float64 `json:"sunshineQuantiles,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AreaMeters2") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AreaMeters2") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

SizeAndSunshineStats: Size and sunniness quantiles of a roof, or part of a roof.

func (*SizeAndSunshineStats) MarshalJSON

func (s *SizeAndSunshineStats) MarshalJSON() ([]byte, error)

func (*SizeAndSunshineStats) UnmarshalJSON

func (s *SizeAndSunshineStats) UnmarshalJSON(data []byte) error

type SolarPanel

type SolarPanel struct {
	// Center: The centre of the panel.
	Center *LatLng `json:"center,omitempty"`

	// Orientation: The orientation of the panel.
	//
	// Possible values:
	//   "SOLAR_PANEL_ORIENTATION_UNSPECIFIED" - No panel orientation is
	// known.
	//   "LANDSCAPE" - A `LANDSCAPE` panel has its long edge perpendicular
	// to the azimuth direction of the roof segment that it is placed on.
	//   "PORTRAIT" - A `PORTRAIT` panel has its long edge parallel to the
	// azimuth direction of the roof segment that it is placed on.
	Orientation string `json:"orientation,omitempty"`

	// SegmentIndex: Index in roof_segment_stats of the
	// `RoofSegmentSizeAndSunshineStats` which corresponds to the roof
	// segment that this panel is placed on.
	SegmentIndex int64 `json:"segmentIndex,omitempty"`

	// YearlyEnergyDcKwh: How much sunlight energy this layout captures over
	// the course of a year, in DC kWh.
	YearlyEnergyDcKwh float64 `json:"yearlyEnergyDcKwh,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Center") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Center") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

SolarPanel: 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.

func (*SolarPanel) MarshalJSON

func (s *SolarPanel) MarshalJSON() ([]byte, error)

func (*SolarPanel) UnmarshalJSON

func (s *SolarPanel) UnmarshalJSON(data []byte) error

type SolarPanelConfig

type SolarPanelConfig struct {
	// PanelsCount: Total number of panels. Note that this is redundant to
	// (the sum of) the corresponding fields in roof_segment_summaries.
	PanelsCount int64 `json:"panelsCount,omitempty"`

	// RoofSegmentSummaries: Information about the production of each roof
	// segment that is carrying at least one panel in this layout.
	// `roof_segment_summaries[i]` describes the i-th roof segment,
	// including its size, expected production and orientation.
	RoofSegmentSummaries []*RoofSegmentSummary `json:"roofSegmentSummaries,omitempty"`

	// YearlyEnergyDcKwh: How much sunlight energy this layout captures over
	// the course of a year, in DC kWh, assuming the panels described above.
	YearlyEnergyDcKwh float64 `json:"yearlyEnergyDcKwh,omitempty"`

	// ForceSendFields is a list of field names (e.g. "PanelsCount") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "PanelsCount") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

SolarPanelConfig: SolarPanelConfig describes a particular placement of solar panels on the roof.

func (*SolarPanelConfig) MarshalJSON

func (s *SolarPanelConfig) MarshalJSON() ([]byte, error)

func (*SolarPanelConfig) UnmarshalJSON

func (s *SolarPanelConfig) UnmarshalJSON(data []byte) error

type SolarPotential

type SolarPotential struct {
	// BuildingStats: Size and sunlight quantiles for the entire building,
	// including parts of the roof that were not assigned to some roof
	// segment. Because the orientations of these parts are not well
	// characterised, the roof area estimate is unreliable, but the ground
	// area estimate is reliable. It may be that a more reliable whole
	// building roof area can be obtained by scaling the roof area from
	// whole_roof_stats by the ratio of the ground areas of `building_stats`
	// and `whole_roof_stats`.
	BuildingStats *SizeAndSunshineStats `json:"buildingStats,omitempty"`

	// CarbonOffsetFactorKgPerMwh: Equivalent amount of CO2 produced per MWh
	// of grid electricity. This is a measure of the carbon intensity of
	// grid electricity displaced by solar electricity.
	CarbonOffsetFactorKgPerMwh float64 `json:"carbonOffsetFactorKgPerMwh,omitempty"`

	// FinancialAnalyses: A FinancialAnalysis gives the savings from going
	// solar assuming a given monthly bill and a given electricity provider.
	// They are in order of increasing order of monthly bill amount. This
	// field will be empty for buildings in areas for which the Solar API
	// does not have enough information to perform financial computations.
	FinancialAnalyses []*FinancialAnalysis `json:"financialAnalyses,omitempty"`

	// MaxArrayAreaMeters2: Size, in square meters, of the maximum array.
	MaxArrayAreaMeters2 float64 `json:"maxArrayAreaMeters2,omitempty"`

	// MaxArrayPanelsCount: Size of the maximum array - that is, the maximum
	// number of panels that can fit on the roof.
	MaxArrayPanelsCount int64 `json:"maxArrayPanelsCount,omitempty"`

	// MaxSunshineHoursPerYear: Maximum number of sunshine hours received
	// per year, by any point on the roof. Sunshine hours are a measure of
	// the total amount of insolation (energy) received per year. 1 sunshine
	// hour = 1 kWh per kW (where kW refers to kW of capacity under Standard
	// Testing Conditions).
	MaxSunshineHoursPerYear float64 `json:"maxSunshineHoursPerYear,omitempty"`

	// PanelCapacityWatts: Capacity, in watts, of the panel used in the
	// calculations.
	PanelCapacityWatts float64 `json:"panelCapacityWatts,omitempty"`

	// PanelHeightMeters: Height, in meters in portrait orientation, of the
	// panel used in the calculations.
	PanelHeightMeters float64 `json:"panelHeightMeters,omitempty"`

	// PanelLifetimeYears: The expected lifetime, in years, of the solar
	// panels. This is used in the financial calculations.
	PanelLifetimeYears int64 `json:"panelLifetimeYears,omitempty"`

	// PanelWidthMeters: Width, in meters in portrait orientation, of the
	// panel used in the calculations.
	PanelWidthMeters float64 `json:"panelWidthMeters,omitempty"`

	// RoofSegmentStats: Size and sunlight quantiles for each roof segment.
	RoofSegmentStats []*RoofSegmentSizeAndSunshineStats `json:"roofSegmentStats,omitempty"`

	// SolarPanelConfigs: Each SolarPanelConfig describes a different
	// arrangement of solar panels on the roof. They are in order of
	// increasing number of panels. The `SolarPanelConfig` with
	// panels_count=N is based on the first N panels in the `solar_panels`
	// list. This field is only populated if at least 4 panels can fit on a
	// roof.
	SolarPanelConfigs []*SolarPanelConfig `json:"solarPanelConfigs,omitempty"`

	// SolarPanels: Each SolarPanel describes a single solar panel. They are
	// listed in the order that the panel layout algorithm placed this. This
	// is usually, though not always, in decreasing order of annual energy
	// production.
	SolarPanels []*SolarPanel `json:"solarPanels,omitempty"`

	// WholeRoofStats: Total size and sunlight quantiles for the part of the
	// roof that was assigned to some roof segment. Despite the name, this
	// may not include the entire building. See building_stats.
	WholeRoofStats *SizeAndSunshineStats `json:"wholeRoofStats,omitempty"`

	// ForceSendFields is a list of field names (e.g. "BuildingStats") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "BuildingStats") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

SolarPotential: Information about the solar potential of a building. A number of fields in this are defined in terms of "panels". The fields panel_capacity_watts, panel_height_meters, and panel_width_meters describe the parameters of the model of panel used in these calculations.

func (*SolarPotential) MarshalJSON

func (s *SolarPotential) MarshalJSON() ([]byte, error)

func (*SolarPotential) UnmarshalJSON

func (s *SolarPotential) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL