diff options
author | Google APIs <noreply@google.com> | 2024-04-22 12:51:04 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-04-22 12:51:55 -0700 |
commit | 03dd9e4025b87c6be2ec2f8987a3953916600d67 (patch) | |
tree | 0a7a2611d8a870cbfec4d088779b81102943a4a5 | |
parent | caad330c676f351a209667840165cc2f136ccf3d (diff) | |
download | googleapis-03dd9e4025b87c6be2ec2f8987a3953916600d67.tar.gz |
feat:Begin publishing the Solar API's client libraries
PiperOrigin-RevId: 627127712
-rw-r--r-- | google/maps/solar/v1/BUILD.bazel | 31 | ||||
-rw-r--r-- | google/maps/solar/v1/solar_service.proto | 65 | ||||
-rw-r--r-- | google/maps/solar/v1/solar_v1.yaml | 28 |
3 files changed, 90 insertions, 34 deletions
diff --git a/google/maps/solar/v1/BUILD.bazel b/google/maps/solar/v1/BUILD.bazel index 633b8e0dd..1aae9d9ee 100644 --- a/google/maps/solar/v1/BUILD.bazel +++ b/google/maps/solar/v1/BUILD.bazel @@ -9,14 +9,17 @@ # * extra_protoc_file_parameters # The complete list of preserved parameters can be found in the source code. +# buildifier: disable=load-on-top + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## -load("@rules_proto//proto:defs.bzl", "proto_library") +# buildifier: disable=same-origin-load load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") +load("@rules_proto//proto:defs.bzl", "proto_library") proto_library( name = "solar_proto", @@ -26,6 +29,7 @@ proto_library( deps = [ "//google/api:annotations_proto", "//google/api:client_proto", + "//google/api:field_behavior_proto", "//google/api:httpbody_proto", "//google/type:date_proto", "//google/type:latlng_proto", @@ -44,6 +48,7 @@ proto_library_with_info( ############################################################################## # Java ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "java_gapic_assembly_gradle_pkg", @@ -93,6 +98,7 @@ java_gapic_test( # Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-maps-solar-v1-java", + include_samples = True, transport = "grpc+rest", deps = [ ":solar_java_gapic", @@ -100,12 +106,12 @@ java_gapic_assembly_gradle_pkg( ":solar_java_proto", ":solar_proto", ], - include_samples = True, ) ############################################################################## # Go ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "go_gapic_assembly_pkg", @@ -148,9 +154,9 @@ go_gapic_assembly_pkg( name = "gapi-cloud-maps-solar-v1-go", deps = [ ":solar_go_gapic", - ":solar_go_gapic_srcjar-test.srcjar", ":solar_go_gapic_srcjar-metadata.srcjar", ":solar_go_gapic_srcjar-snippets.srcjar", + ":solar_go_gapic_srcjar-test.srcjar", ":solar_go_proto", ], ) @@ -158,6 +164,7 @@ go_gapic_assembly_pkg( ############################################################################## # Python ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "py_gapic_assembly_pkg", @@ -172,7 +179,8 @@ py_gapic_library( rest_numeric_enums = True, service_yaml = "solar_v1.yaml", transport = "grpc+rest", - deps = [], + deps = [ + ], ) py_test( @@ -196,6 +204,7 @@ py_gapic_assembly_pkg( ############################################################################## # PHP ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "php_gapic_assembly_pkg", @@ -212,8 +221,8 @@ php_gapic_library( name = "solar_php_gapic", srcs = [":solar_proto_with_info"], grpc_service_config = "solar_grpc_service_config.json", - rest_numeric_enums = True, migration_mode = "NEW_SURFACE_ONLY", + rest_numeric_enums = True, service_yaml = "solar_v1.yaml", transport = "grpc+rest", deps = [ @@ -233,6 +242,7 @@ php_gapic_assembly_pkg( ############################################################################## # Node.js ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "nodejs_gapic_assembly_pkg", @@ -263,10 +273,11 @@ nodejs_gapic_assembly_pkg( ############################################################################## # Ruby ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", - "ruby_gapic_assembly_pkg", "ruby_cloud_gapic_library", + "ruby_gapic_assembly_pkg", "ruby_grpc_library", "ruby_proto_library", ) @@ -285,9 +296,7 @@ ruby_grpc_library( ruby_cloud_gapic_library( name = "solar_ruby_gapic", srcs = [":solar_proto_with_info"], - extra_protoc_parameters = [ - "ruby-cloud-gem-name=google-cloud-maps-solar-v1", - ], + extra_protoc_parameters = ["ruby-cloud-gem-name=google-cloud-maps-solar-v1"], grpc_service_config = "solar_grpc_service_config.json", rest_numeric_enums = True, service_yaml = "solar_v1.yaml", @@ -311,6 +320,7 @@ ruby_gapic_assembly_pkg( ############################################################################## # C# ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "csharp_gapic_assembly_pkg", @@ -321,7 +331,6 @@ load( csharp_proto_library( name = "solar_csharp_proto", - extra_opts = [], deps = [":solar_proto"], ) @@ -338,6 +347,7 @@ csharp_gapic_library( grpc_service_config = "solar_grpc_service_config.json", rest_numeric_enums = True, service_yaml = "solar_v1.yaml", + transport = "grpc+rest", deps = [ ":solar_csharp_grpc", ":solar_csharp_proto", @@ -357,6 +367,7 @@ csharp_gapic_assembly_pkg( ############################################################################## # C++ ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "cc_grpc_library", diff --git a/google/maps/solar/v1/solar_service.proto b/google/maps/solar/v1/solar_service.proto index cbe0d9bee..69a0591f5 100644 --- a/google/maps/solar/v1/solar_service.proto +++ b/google/maps/solar/v1/solar_service.proto @@ -18,6 +18,7 @@ package google.maps.solar.v1; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/api/httpbody.proto"; import "google/type/date.proto"; import "google/type/latlng.proto"; @@ -67,14 +68,22 @@ service Solar { // Request message for `Solar.FindClosestBuildingInsights`. message FindClosestBuildingInsightsRequest { - // The longitude and latitude from which the API looks for the nearest known - // building. - google.type.LatLng location = 1; + // Required. The longitude and latitude from which the API looks for the + // nearest known building. + google.type.LatLng location = 1 [(google.api.field_behavior) = REQUIRED]; - // The minimum quality level allowed in the results. No result with + // Optional. 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. - ImageryQuality required_quality = 3; + ImageryQuality required_quality = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to require exact quality of the imagery. + // If set to false, the `required_quality` field is interpreted as the minimum + // required quality, such that HIGH quality imagery may be returned when + // `required_quality` is set to MEDIUM. If set to true, `required_quality` + // is interpreted as the exact required quality and only `MEDIUM` quality + // imagery is returned if `required_quality` is set to `MEDIUM`. + bool exact_quality_required = 4 [(google.api.field_behavior) = OPTIONAL]; } // A bounding box in lat/lng coordinates. @@ -202,7 +211,8 @@ message SolarPotential { // order of increasing number of panels. The `SolarPanelConfig` with // [panels_count] // [google.maps.solar.v1.SolarPanelConfig.panels_count]=N is - // based on the first N panels in the `solar_panels` list. + // 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. repeated SolarPanelConfig solar_panel_configs = 7; // A [FinancialAnalysis] @@ -496,8 +506,6 @@ message CashPurchaseSavings { // Cost and benefit of using a loan to buy a particular configuration // of solar panels with a particular electricity usage. -// Initial out of pocket cost is zero in our model: the loan covers -// everything. message FinancedPurchaseSavings { // Annual loan payments. google.type.Money annual_loan_payment = 1; @@ -515,10 +523,11 @@ message FinancedPurchaseSavings { // Request message for `Solar.GetDataLayers`. message GetDataLayersRequest { - // The longitude and latitude for the center of the region to get data for. - google.type.LatLng location = 1; + // Required. The longitude and latitude for the center of the region to get + // data for. + google.type.LatLng location = 1 [(google.api.field_behavior) = REQUIRED]; - // The radius, in meters, defining the region surrounding that + // Required. The radius, in meters, defining the region surrounding that // centre point for which data should be returned. The limitations // on this value are: // @@ -527,24 +536,32 @@ message GetDataLayersRequest { // `radius_meters` <= `pixel_size_meters * 1000`. // * However, for values over 175m, the `DataLayerView` in the // request must not include monthly flux or hourly shade. - float radius_meters = 2; + float radius_meters = 2 [(google.api.field_behavior) = REQUIRED]; - // The desired subset of the data to return. - DataLayerView view = 3; + // Optional. The desired subset of the data to return. + DataLayerView view = 3 [(google.api.field_behavior) = OPTIONAL]; - // The minimum quality level allowed in the results. No result with + // Optional. 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. - ImageryQuality required_quality = 5; + ImageryQuality required_quality = 5 [(google.api.field_behavior) = OPTIONAL]; - // The minimum scale, in meters per pixel, of the data to return. + // Optional. 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. - float pixel_size_meters = 6; + float pixel_size_meters = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to require exact quality of the imagery. + // If set to false, the `required_quality` field is interpreted as the minimum + // required quality, such that HIGH quality imagery may be returned when + // `required_quality` is set to MEDIUM. If set to true, `required_quality` + // is interpreted as the exact required quality and only `MEDIUM` quality + // imagery is returned if `required_quality` is set to `MEDIUM`. + bool exact_quality_required = 7 [(google.api.field_behavior) = OPTIONAL]; } // Information about the solar potential of a region. The actual data @@ -629,6 +646,12 @@ message DataLayers { ImageryQuality imagery_quality = 9; } +// Request message for `Solar.GetGeoTiff`. +message GetGeoTiffRequest { + // Required. The ID of the asset being requested. + string id = 1 [(google.api.field_behavior) = REQUIRED]; +} + // What subset of the solar information to return. enum DataLayerView { // Equivalent to FULL. @@ -683,9 +706,3 @@ enum SolarPanelOrientation { // direction of the roof segment that it is placed on. PORTRAIT = 2; } - -// Request message for `Solar.GetGeoTiff`. -message GetGeoTiffRequest { - // The ID of the asset being requested. - string id = 1; -} diff --git a/google/maps/solar/v1/solar_v1.yaml b/google/maps/solar/v1/solar_v1.yaml index ab412a4f9..3ce0cbb94 100644 --- a/google/maps/solar/v1/solar_v1.yaml +++ b/google/maps/solar/v1/solar_v1.yaml @@ -16,3 +16,31 @@ authentication: oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform + +publishing: + new_issue_uri: https://issuetracker.google.com/issues/new?component=1356349 + documentation_uri: https://developers.google.com/maps/documentation/solar/overview + api_short_name: solar + github_label: 'api: solar' + doc_tag_prefix: solar + organization: GEO + library_settings: + - version: google.maps.solar.v1 + launch_stage: GA + java_settings: + common: + destinations: + - PACKAGE_MANAGER + python_settings: + common: + destinations: + - PACKAGE_MANAGER + node_settings: + common: + destinations: + - PACKAGE_MANAGER + go_settings: + common: + destinations: + - PACKAGE_MANAGER + proto_reference_documentation_uri: https://developers.google.com/maps/documentation/solar/reference/rest |