diff --git a/Chronicle/metadata/V1/BigQueryExport.php b/Chronicle/metadata/V1/BigQueryExport.php new file mode 100644 index 00000000000..5fc67fbcca6 --- /dev/null +++ b/Chronicle/metadata/V1/BigQueryExport.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + "\x0A\x9C\x17\x0A0google/cloud/chronicle/v1/big_query_export.proto\x12\x19google.cloud.chronicle.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xF9\x05\x0A\x0EBigQueryExport\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x18\x0A\x0Bprovisioned\x18\x02 \x01(\x08B\x03\xE0A\x03\x12W\x0A\x18big_query_export_package\x18\x03 \x01(\x0E20.google.cloud.chronicle.v1.BigQueryExportPackageB\x03\xE0A\x03\x12W\x0A\x15entity_graph_settings\x18\x04 \x01(\x0B23.google.cloud.chronicle.v1.DataSourceExportSettingsB\x03\xE0A\x01\x12V\x0A\x14ioc_matches_settings\x18\x05 \x01(\x0B23.google.cloud.chronicle.v1.DataSourceExportSettingsB\x03\xE0A\x01\x12Z\x0A\x18rule_detections_settings\x18\x06 \x01(\x0B23.google.cloud.chronicle.v1.DataSourceExportSettingsB\x03\xE0A\x01\x12`\x0A\x1Eudm_events_aggregates_settings\x18\x07 \x01(\x0B23.google.cloud.chronicle.v1.DataSourceExportSettingsB\x03\xE0A\x01\x12U\x0A\x13udm_events_settings\x18\x08 \x01(\x0B23.google.cloud.chronicle.v1.DataSourceExportSettingsB\x03\xE0A\x01:\x9A\x01\xEAA\x96\x01\x0A'chronicle.googleapis.com/BigQueryExport\x12Kprojects/{project}/locations/{location}/instances/{instance}/bigQueryExport*\x0EbigQueryExport2\x0EbigQueryExport\"\xFC\x01\x0A\x18DataSourceExportSettings\x12\x14\x0A\x07enabled\x18\x01 \x01(\x08B\x03\xE0A\x02\x12\x1B\x0A\x0Eretention_days\x18\x02 \x01(\x05B\x03\xE0A\x02\x12U\x0A\x17latest_export_job_state\x18\x03 \x01(\x0E2/.google.cloud.chronicle.v1.LatestExportJobStateB\x03\xE0A\x03\x12<\x0A\x13data_freshness_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x18\x0A\x0Bdata_volume\x18\x05 \x01(\x03B\x03\xE0A\x03\"Y\x0A\x18GetBigQueryExportRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'chronicle.googleapis.com/BigQueryExport\"\x9D\x01\x0A\x1BUpdateBigQueryExportRequest\x12H\x0A\x10big_query_export\x18\x01 \x01(\x0B2).google.cloud.chronicle.v1.BigQueryExportB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"a\x0A\x1EProvisionBigQueryExportRequest\x12?\x0A\x06parent\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x12'chronicle.googleapis.com/BigQueryExport*\x8C\x01\x0A\x15BigQueryExportPackage\x12(\x0A\$BIG_QUERY_EXPORT_PACKAGE_UNSPECIFIED\x10\x00\x12\"\x0A\x1EBIG_QUERY_EXPORT_PACKAGE_BYOBQ\x10\x01\x12%\x0A!BIG_QUERY_EXPORT_PACKAGE_ADVANCED\x10\x02*\x88\x01\x0A\x14LatestExportJobState\x12'\x0A#LATEST_EXPORT_JOB_STATE_UNSPECIFIED\x10\x00\x12#\x0A\x1FLATEST_EXPORT_JOB_STATE_SUCCESS\x10\x01\x12\"\x0A\x1ELATEST_EXPORT_JOB_STATE_FAILED\x10\x022\xEC\x06\x0A\x15BigQueryExportService\x12\xC0\x01\x0A\x11GetBigQueryExport\x123.google.cloud.chronicle.v1.GetBigQueryExportRequest\x1A).google.cloud.chronicle.v1.BigQueryExport\"K\xDAA\x04name\x82\xD3\xE4\x93\x02>\x12internalAddGeneratedFile( + "\x0A\xD4Y\x0A/google/cloud/chronicle/v1/dashboard_chart.proto\x12\x19google.cloud.chronicle.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A/google/cloud/chronicle/v1/dashboard_query.proto\"\xFD=\x0A\x0EDashboardChart\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x03\xFAA)\x0A'chronicle.googleapis.com/DashboardChart\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x03 \x01(\x09B\x03\xE0A\x01\x12J\x0A\x10native_dashboard\x18\x04 \x01(\x09B0\xE0A\x03\xFAA*\x0A(chronicle.googleapis.com/NativeDashboard\x12;\x0A\x09tile_type\x18\x07 \x01(\x0E2#.google.cloud.chronicle.v1.TileTypeB\x03\xE0A\x01\x12X\x0A\x10chart_datasource\x18\x05 \x01(\x0B29.google.cloud.chronicle.v1.DashboardChart.ChartDatasourceB\x03\xE0A\x01\x12S\x0A\x0Dvisualization\x18\x06 \x01(\x0B27.google.cloud.chronicle.v1.DashboardChart.VisualizationB\x03\xE0A\x02\x12\x11\x0A\x04etag\x18\x08 \x01(\x09B\x03\xE0A\x01\x12Y\x0A\x11drill_down_config\x18\x09 \x01(\x0B29.google.cloud.chronicle.v1.DashboardChart.DrillDownConfigB\x03\xE0A\x01\x12\x13\x0A\x06tokens\x18\x0A \x03(\x09B\x03\xE0A\x01\x1A\x95\x01\x0A\x0FChartDatasource\x12E\x0A\x0Fdashboard_query\x18\x01 \x01(\x09B,\xFAA)\x0A'chronicle.googleapis.com/DashboardQuery\x12;\x0A\x0Cdata_sources\x18\x03 \x03(\x0E2%.google.cloud.chronicle.v1.DataSource\x1A\x8C+\x0A\x0DVisualization\x12L\x0A\x06x_axes\x18\x07 \x03(\x0B2<.google.cloud.chronicle.v1.DashboardChart.Visualization.Axis\x12L\x0A\x06y_axes\x18\x08 \x03(\x0B2<.google.cloud.chronicle.v1.DashboardChart.Visualization.Axis\x12N\x0A\x06series\x18\x03 \x03(\x0B2>.google.cloud.chronicle.v1.DashboardChart.Visualization.Series\x12P\x0A\x07tooltip\x18\x04 \x01(\x0B2?.google.cloud.chronicle.v1.DashboardChart.Visualization.Tooltip\x12O\x0A\x07legends\x18\x09 \x03(\x0B2>.google.cloud.chronicle.v1.DashboardChart.Visualization.Legend\x12V\x0A\x0Bcolumn_defs\x18\x0A \x03(\x0B2A.google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnDef\x12^\x0A\x0Ctable_config\x18\x12 \x01(\x0B2C.google.cloud.chronicle.v1.DashboardChart.Visualization.TableConfigB\x03\xE0A\x01\x121\x0A\x06button\x18\x0B \x01(\x0B2!.google.cloud.chronicle.v1.Button\x12:\x0A\x08markdown\x18\x11 \x01(\x0B2#.google.cloud.chronicle.v1.MarkdownB\x03\xE0A\x01\x12\x1A\x0A\x0Dseries_column\x18\x0C \x03(\x09B\x03\xE0A\x01\x12\x1A\x0A\x0Dgrouping_type\x18\x0D \x01(\x09B\x03\xE0A\x01\x12i\x0A\x12google_maps_config\x18\x0E \x01(\x0B2H.google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfigB\x03\xE0A\x01\x12'\x0A\x1Athreshold_coloring_enabled\x18\x0F \x01(\x08B\x03\xE0A\x01\x12[\x0A\x0Bvisual_maps\x18\x10 \x03(\x0B2A.google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMapB\x03\xE0A\x01\x1A\x88\x01\x0A\x04Axis\x126\x0A\x09axis_type\x18\x04 \x01(\x0E2#.google.cloud.chronicle.v1.AxisType\x12\x14\x0A\x0Cdisplay_name\x18\x05 \x01(\x09\x12\x10\x0A\x03min\x18\x06 \x01(\x05H\x00\x88\x01\x01\x12\x10\x0A\x03max\x18\x07 \x01(\x05H\x01\x88\x01\x01B\x06\x0A\x04_minB\x06\x0A\x04_max\x1A\xC1\x12\x0A\x06Series\x12:\x0A\x0Bseries_type\x18\x08 \x01(\x0E2%.google.cloud.chronicle.v1.SeriesType\x12\x13\x0A\x0Bseries_name\x18\x02 \x01(\x09\x12\x13\x0A\x0Bshow_symbol\x18\x04 \x01(\x08\x12\x17\x0A\x0Fshow_background\x18\x05 \x01(\x08\x12\x0D\x0A\x05stack\x18\x06 \x01(\x09\x12M\x0A\x15series_stack_strategy\x18\x09 \x01(\x0E2..google.cloud.chronicle.v1.SeriesStackStrategy\x12U\x0A\x06encode\x18\x0A \x01(\x0B2E.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.Encode\x12\x0D\x0A\x05label\x18\x0B \x01(\x09\x12\x0D\x0A\x05field\x18\x0C \x01(\x09\x12a\x0A\x0Adata_label\x18\x0D \x01(\x0B2H.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.DataLabelB\x03\xE0A\x01\x12\x13\x0A\x06radius\x18\x0E \x03(\x09B\x03\xE0A\x01\x12a\x0A\x0Aitem_style\x18\x0F \x01(\x0B2H.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemStyleB\x03\xE0A\x01\x12 \x0A\x13series_unique_value\x18\x10 \x01(\x09B\x03\xE0A\x01\x12a\x0A\x0Aarea_style\x18\x11 \x01(\x0B2H.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.AreaStyleB\x03\xE0A\x01\x12c\x0A\x0Bitem_colors\x18\x12 \x01(\x0B2I.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemColorsB\x03\xE0A\x01\x12e\x0A\x0Cgauge_config\x18\x13 \x01(\x0B2J.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeConfigB\x03\xE0A\x01\x12r\x0A\x13metric_trend_config\x18\x14 \x01(\x0B2P.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.MetricTrendConfigB\x03\xE0A\x01\x1A@\x0A\x06Encode\x12\x09\x0A\x01x\x18\x01 \x01(\x09\x12\x09\x0A\x01y\x18\x02 \x01(\x09\x12\x0D\x0A\x05value\x18\x03 \x01(\x09\x12\x11\x0A\x09item_name\x18\x04 \x01(\x09\x1A\x1E\x0A\x09DataLabel\x12\x11\x0A\x04show\x18\x01 \x01(\x08B\x03\xE0A\x01\x1AU\x0A\x09ItemStyle\x12\x19\x0A\x0Cborder_width\x18\x01 \x01(\x05B\x03\xE0A\x01\x12\x19\x0A\x0Cborder_color\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x12\x0A\x05color\x18\x03 \x01(\x09B\x03\xE0A\x01\x1A\xBB\x01\x0A\x09AreaStyle\x12\x12\x0A\x05color\x18\x01 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06origin\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bshadow_blur\x18\x03 \x01(\x05B\x03\xE0A\x01\x12\x19\x0A\x0Cshadow_color\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x1C\x0A\x0Fshadow_offset_x\x18\x05 \x01(\x05B\x03\xE0A\x01\x12\x1C\x0A\x0Fshadow_offset_y\x18\x06 \x01(\x05B\x03\xE0A\x01\x12\x14\x0A\x07opacity\x18\x07 \x01(\x05B\x03\xE0A\x01\x1A<\x0A\x12UserSelectedValues\x12\x12\x0A\x05color\x18\x01 \x01(\x09B\x03\xE0A\x01\x12\x12\x0A\x05label\x18\x02 \x01(\x09B\x03\xE0A\x01\x1A\x8A\x01\x0A\x0FChartSliceColor\x12\x10\x0A\x03key\x18\x01 \x01(\x09B\x03\xE0A\x01\x12e\x0A\x05value\x18\x02 \x01(\x0B2Q.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.UserSelectedValuesB\x03\xE0A\x01\x1Aq\x0A\x0AItemColors\x12c\x0A\x06colors\x18\x01 \x03(\x0B2N.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ChartSliceColorB\x03\xE0A\x01\x1A4\x0A\x0AGaugeValue\x12\x12\x0A\x05value\x18\x01 \x01(\x05B\x03\xE0A\x01\x12\x12\x0A\x05color\x18\x02 \x01(\x09B\x03\xE0A\x01\x1A\xC0\x02\x0A\x0BGaugeConfig\x12b\x0A\x0Abase_value\x18\x01 \x01(\x0B2I.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValueB\x03\xE0A\x01\x12c\x0A\x0Blimit_value\x18\x02 \x01(\x0B2I.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValueB\x03\xE0A\x01\x12h\x0A\x10threshold_values\x18\x03 \x03(\x0B2I.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValueB\x03\xE0A\x01\x1A\x96\x02\x0A\x11MetricTrendConfig\x12C\x0A\x0Dmetric_format\x18\x01 \x01(\x0E2'.google.cloud.chronicle.v1.MetricFormatB\x03\xE0A\x01\x12\x1E\x0A\x11show_metric_trend\x18\x05 \x01(\x08B\x03\xE0A\x01\x12P\x0A\x14metric_display_trend\x18\x03 \x01(\x0E2-.google.cloud.chronicle.v1.MetricDisplayTrendB\x03\xE0A\x01\x12J\x0A\x11metric_trend_type\x18\x04 \x01(\x0E2*.google.cloud.chronicle.v1.MetricTrendTypeB\x03\xE0A\x01\x1A[\x0A\x07Tooltip\x12\x0C\x0A\x04show\x18\x01 \x01(\x08\x12B\x0A\x0Ftooltip_trigger\x18\x03 \x01(\x0E2).google.cloud.chronicle.v1.ToolTipTrigger\x1A\x87\x02\x0A\x06Legend\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x0C\x0A\x04show\x18\x02 \x01(\x08\x12\x0F\x0A\x07z_level\x18\x03 \x01(\x05\x12\x09\x0A\x01z\x18\x04 \x01(\x05\x12\x0C\x0A\x04left\x18\x05 \x01(\x05\x12\x0B\x0A\x03top\x18\x06 \x01(\x05\x12\x0D\x0A\x05right\x18\x07 \x01(\x05\x12\x0E\x0A\x06bottom\x18\x08 \x01(\x05\x12>\x0A\x0Dlegend_orient\x18\x0C \x01(\x0E2'.google.cloud.chronicle.v1.LegendOrient\x12<\x0A\x0Clegend_align\x18\x0D \x01(\x0E2&.google.cloud.chronicle.v1.LegendAlign\x12\x0F\x0A\x07padding\x18\x0B \x03(\x05\x1A*\x0A\x09ColumnDef\x12\x0D\x0A\x05field\x18\x01 \x01(\x09\x12\x0E\x0A\x06header\x18\x02 \x01(\x09\x1Av\x0A\x18ColumnRenderTypeSettings\x12\x12\x0A\x05field\x18\x01 \x01(\x09B\x03\xE0A\x01\x12F\x0A\x12column_render_type\x18\x02 \x01(\x0E2%.google.cloud.chronicle.v1.RenderTypeB\x03\xE0A\x01\x1Am\x0A\x15ColumnTooltipSettings\x12\x12\x0A\x05field\x18\x01 \x01(\x09B\x03\xE0A\x02\x12 \x0A\x13header_tooltip_text\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x1E\x0A\x11cell_tooltip_text\x18\x03 \x01(\x09B\x03\xE0A\x01\x1A\x9D\x02\x0A\x0BTableConfig\x12\x1D\x0A\x10enable_text_wrap\x18\x01 \x01(\x08B\x03\xE0A\x01\x12z\x0A\x1Bcolumn_render_type_settings\x18\x02 \x03(\x0B2P.google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnRenderTypeSettingsB\x03\xE0A\x01\x12s\x0A\x17column_tooltip_settings\x18\x03 \x03(\x0B2M.google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnTooltipSettingsB\x03\xE0A\x01\x1A\xFD\x05\x0A\x10GoogleMapsConfig\x12q\x0A\x0Ddata_settings\x18\x01 \x01(\x0B2U.google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.DataSettingsB\x03\xE0A\x01\x12;\x0A\x09plot_mode\x18\x02 \x01(\x0E2#.google.cloud.chronicle.v1.PlotModeB\x03\xE0A\x01\x12o\x0A\x0Cmap_position\x18\x03 \x01(\x0B2T.google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.MapPositionB\x03\xE0A\x01\x12s\x0A\x0Epoint_settings\x18\x04 \x01(\x0B2V.google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.PointSettingsB\x03\xE0A\x01\x1Af\x0A\x0CDataSettings\x12\x1C\x0A\x0Flatitude_column\x18\x01 \x01(\x09B\x03\xE0A\x01\x12\x1D\x0A\x10longitude_column\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x19\x0A\x0Ccount_column\x18\x03 \x01(\x09B\x03\xE0A\x01\x1A~\x0A\x0BMapPosition\x12\x15\x0A\x08fit_data\x18\x01 \x01(\x08B\x03\xE0A\x01\x12\x1B\x0A\x0Elatitude_value\x18\x05 \x01(\x01B\x03\xE0A\x01\x12\x1C\x0A\x0Flongitude_value\x18\x06 \x01(\x01B\x03\xE0A\x01\x12\x1D\x0A\x10zoom_scale_value\x18\x07 \x01(\x01B\x03\xE0A\x01\x1Ak\x0A\x0DPointSettings\x12F\x0A\x0Fpoint_size_type\x18\x01 \x01(\x0E2(.google.cloud.chronicle.v1.PointSizeTypeB\x03\xE0A\x01\x12\x12\x0A\x05color\x18\x02 \x01(\x09B\x03\xE0A\x01\x1A\xB2\x02\x0A\x09VisualMap\x12F\x0A\x0Fvisual_map_type\x18\x01 \x01(\x0E2(.google.cloud.chronicle.v1.VisualMapTypeB\x03\xE0A\x01\x12e\x0A\x06pieces\x18\x02 \x03(\x0B2P.google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap.VisualMapPieceB\x03\xE0A\x01\x1Av\x0A\x0EVisualMapPiece\x12\x15\x0A\x03min\x18\x01 \x01(\x03B\x03\xE0A\x01H\x00\x88\x01\x01\x12\x15\x0A\x03max\x18\x02 \x01(\x03B\x03\xE0A\x01H\x01\x88\x01\x01\x12\x12\x0A\x05color\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x12\x0A\x05label\x18\x04 \x01(\x09B\x03\xE0A\x01B\x06\x0A\x04_minB\x06\x0A\x04_max\x1A\xED\x0B\x0A\x0FDrillDownConfig\x12b\x0A\x10left_drill_downs\x18\x01 \x03(\x0B2C.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDownB\x03\xE0A\x02\x12c\x0A\x11right_drill_downs\x18\x02 \x03(\x0B2C.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDownB\x03\xE0A\x02\x1A\x90\x0A\x0A\x09DrillDown\x12x\x0A\x10default_settings\x18\x03 \x01(\x0B2\\.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.DefaultDrillDownSettingsH\x00\x12v\x0A\x0Fcustom_settings\x18\x04 \x01(\x0B2[.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettingsH\x00\x12\x0F\x0A\x02id\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x02\x1A0\x0A\x18DefaultDrillDownSettings\x12\x14\x0A\x07enabled\x18\x01 \x01(\x08B\x03\xE0A\x02\x1A\xA6\x07\x0A\x17CustomDrillDownSettings\x12{\x0A\x05query\x18\x03 \x01(\x0B2j.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownQueryH\x00\x12}\x0A\x06filter\x18\x04 \x01(\x0B2k.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilterH\x00\x12\x8A\x01\x0A\x0Dexternal_link\x18\x05 \x01(\x0B2q.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownExternalLinkH\x00\x12\x14\x0A\x07new_tab\x18\x01 \x01(\x08B\x03\xE0A\x02\x12\x1E\x0A\x11left_click_column\x18\x02 \x01(\x09B\x03\xE0A\x01\x1A\$\x0A\x0EDrillDownQuery\x12\x12\x0A\x05query\x18\x01 \x01(\x09B\x03\xE0A\x02\x1A\xD5\x02\x0A\x0FDrillDownFilter\x12\xA5\x01\x0A\x11dashboard_filters\x18\x01 \x03(\x0B2\x84\x01.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter.DrillDownDashboardFilterB\x03\xE0A\x02\x1A\x99\x01\x0A\x18DrillDownDashboardFilter\x12 \x0A\x13dashboard_filter_id\x18\x01 \x01(\x09B\x03\xE0A\x02\x12[\x0A\x1Afilter_operator_and_values\x18\x02 \x03(\x0B22.google.cloud.chronicle.v1.FilterOperatorAndValuesB\x03\xE0A\x02\x1AD\x0A\x15DrillDownExternalLink\x12\x11\x0A\x04link\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x02 \x01(\x09B\x03\xE0A\x01B\x08\x0A\x06actionB\x0A\x0A\x08settings:\xA4\x01\xEAA\xA0\x01\x0A'chronicle.googleapis.com/DashboardChart\x12Tprojects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}*\x0FdashboardCharts2\x0EdashboardChart\"\x90\x02\x0A\x06Button\x12\x12\x0A\x05label\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x16\x0A\x09hyperlink\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x14\x0A\x07new_tab\x18\x04 \x01(\x08B\x03\xE0A\x01\x12E\x0A\x0Aproperties\x18\x05 \x01(\x0B2,.google.cloud.chronicle.v1.Button.PropertiesB\x03\xE0A\x01\x1Ac\x0A\x0AProperties\x12\x12\x0A\x05color\x18\x01 \x01(\x09B\x03\xE0A\x01\x12A\x0A\x0Cbutton_style\x18\x02 \x01(\x0E2&.google.cloud.chronicle.v1.ButtonStyleB\x03\xE0A\x01\"\xA6\x01\x0A\x08Markdown\x12\x14\x0A\x07content\x18\x01 \x01(\x09B\x03\xE0A\x02\x12O\x0A\x0Aproperties\x18\x02 \x01(\x0B26.google.cloud.chronicle.v1.Markdown.MarkdownPropertiesB\x03\xE0A\x01\x1A3\x0A\x12MarkdownProperties\x12\x1D\x0A\x10background_color\x18\x03 \x01(\x09B\x03\xE0A\x01\"Y\x0A\x18GetDashboardChartRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'chronicle.googleapis.com/DashboardChart\"\xA1\x01\x0A\x1EBatchGetDashboardChartsRequest\x12?\x0A\x06parent\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x12'chronicle.googleapis.com/DashboardChart\x12>\x0A\x05names\x18\x02 \x03(\x09B/\xE0A\x02\xFAA)\x0A'chronicle.googleapis.com/DashboardChart\"f\x0A\x1FBatchGetDashboardChartsResponse\x12C\x0A\x10dashboard_charts\x18\x01 \x03(\x0B2).google.cloud.chronicle.v1.DashboardChart*p\x0A\x08TileType\x12\x19\x0A\x15TILE_TYPE_UNSPECIFIED\x10\x00\x12\x1B\x0A\x17TILE_TYPE_VISUALIZATION\x10\x01\x12\x14\x0A\x10TILE_TYPE_BUTTON\x10\x02\x12\x16\x0A\x12TILE_TYPE_MARKDOWN\x10\x03*t\x0A\x0ARenderType\x12\x1B\x0A\x17RENDER_TYPE_UNSPECIFIED\x10\x00\x12\x14\x0A\x10RENDER_TYPE_TEXT\x10\x01\x12\x14\x0A\x10RENDER_TYPE_ICON\x10\x02\x12\x1D\x0A\x19RENDER_TYPE_ICON_AND_TEXT\x10\x03*Q\x0A\x08AxisType\x12\x19\x0A\x15AXIS_TYPE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05VALUE\x10\x01\x12\x0C\x0A\x08CATEGORY\x10\x02\x12\x08\x0A\x04TIME\x10\x03\x12\x07\x0A\x03LOG\x10\x04*t\x0A\x0ASeriesType\x12\x1B\x0A\x17SERIES_TYPE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04LINE\x10\x01\x12\x07\x0A\x03BAR\x10\x02\x12\x07\x0A\x03PIE\x10\x03\x12\x08\x0A\x04TEXT\x10\x04\x12\x07\x0A\x03MAP\x10\x05\x12\x09\x0A\x05GAUGE\x10\x06\x12\x0F\x0A\x0BSCATTERPLOT\x10\x07*o\x0A\x13SeriesStackStrategy\x12%\x0A!SERIES_STACK_STRATEGY_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08SAMESIGN\x10\x01\x12\x07\x0A\x03ALL\x10\x02\x12\x0C\x0A\x08POSITIVE\x10\x03\x12\x0C\x0A\x08NEGATIVE\x10\x04*\x7F\x0A\x0EToolTipTrigger\x12\x1F\x0A\x1BTOOLTIP_TRIGGER_UNSPECIFIED\x10\x00\x12\x18\x0A\x14TOOLTIP_TRIGGER_NONE\x10\x01\x12\x18\x0A\x14TOOLTIP_TRIGGER_ITEM\x10\x02\x12\x18\x0A\x14TOOLTIP_TRIGGER_AXIS\x10\x03*K\x0A\x0CLegendOrient\x12\x1D\x0A\x19LEGEND_ORIENT_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08VERTICAL\x10\x01\x12\x0E\x0A\x0AHORIZONTAL\x10\x02*J\x0A\x0BLegendAlign\x12\x1C\x0A\x18LEGEND_ALIGN_UNSPECIFIED\x10\x00\x12\x08\x0A\x04AUTO\x10\x01\x12\x08\x0A\x04LEFT\x10\x02\x12\x09\x0A\x05RIGHT\x10\x03*}\x0A\x0BButtonStyle\x12\x1C\x0A\x18BUTTON_STYLE_UNSPECIFIED\x10\x00\x12\x17\x0A\x13BUTTON_STYLE_FILLED\x10\x01\x12\x19\x0A\x15BUTTON_STYLE_OUTLINED\x10\x02\x12\x1C\x0A\x18BUTTON_STYLE_TRANSPARENT\x10\x03*f\x0A\x08PlotMode\x12\x19\x0A\x15PLOT_MODE_UNSPECIFIED\x10\x00\x12\x14\x0A\x10PLOT_MODE_POINTS\x10\x01\x12\x15\x0A\x11PLOT_MODE_HEATMAP\x10\x02\x12\x12\x0A\x0EPLOT_MODE_BOTH\x10\x03*u\x0A\x0DPointSizeType\x12\x1F\x0A\x1BPOINT_SIZE_TYPE_UNSPECIFIED\x10\x00\x12\x19\x0A\x15POINT_SIZE_TYPE_FIXED\x10\x01\x12(\x0A\$POINT_SIZE_TYPE_PROPORTIONAL_TO_SIZE\x10\x02*e\x0A\x0CMetricFormat\x12\x1D\x0A\x19METRIC_FORMAT_UNSPECIFIED\x10\x00\x12\x18\x0A\x14METRIC_FORMAT_NUMBER\x10\x01\x12\x1C\x0A\x18METRIC_FORMAT_PLAIN_TEXT\x10\x02*\xC0\x01\x0A\x12MetricDisplayTrend\x12\$\x0A METRIC_DISPLAY_TREND_UNSPECIFIED\x10\x00\x12'\x0A#METRIC_DISPLAY_TREND_ABSOLUTE_VALUE\x10\x02\x12#\x0A\x1FMETRIC_DISPLAY_TREND_PERCENTAGE\x10\x03\x126\x0A2METRIC_DISPLAY_TREND_ABSOLUTE_VALUE_AND_PERCENTAGE\x10\x04*r\x0A\x0FMetricTrendType\x12!\x0A\x1DMETRIC_TREND_TYPE_UNSPECIFIED\x10\x00\x12\x1D\x0A\x19METRIC_TREND_TYPE_REGULAR\x10\x01\x12\x1D\x0A\x19METRIC_TREND_TYPE_INVERSE\x10\x02*O\x0A\x0DVisualMapType\x12\x1F\x0A\x1BVISUAL_MAP_TYPE_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ACONTINUOUS\x10\x01\x12\x0D\x0A\x09PIECEWISE\x10\x022\xFE\x04\x0A\x15DashboardChartService\x12\xC3\x01\x0A\x11GetDashboardChart\x123.google.cloud.chronicle.v1.GetDashboardChartRequest\x1A).google.cloud.chronicle.v1.DashboardChart\"N\xDAA\x04name\x82\xD3\xE4\x93\x02A\x12?/v1/{name=projects/*/locations/*/instances/*/dashboardCharts/*}\x12\xF1\x01\x0A\x17BatchGetDashboardCharts\x129.google.cloud.chronicle.v1.BatchGetDashboardChartsRequest\x1A:.google.cloud.chronicle.v1.BatchGetDashboardChartsResponse\"_\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02J\x12H/v1/{parent=projects/*/locations/*/instances/*}/dashboardCharts:batchGet\x1A\xAA\x01\xCAA\x18chronicle.googleapis.com\xD2A\x8B\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xCA\x01\x0A\x1Dcom.google.cloud.chronicle.v1B\x13DashboardChartProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xAA\x02\x19Google.Cloud.Chronicle.V1\xCA\x02\x19Google\\Cloud\\Chronicle\\V1\xEA\x02\x1CGoogle::Cloud::Chronicle::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/Chronicle/metadata/V1/DashboardQuery.php b/Chronicle/metadata/V1/DashboardQuery.php new file mode 100644 index 00000000000..e7f520233ee --- /dev/null +++ b/Chronicle/metadata/V1/DashboardQuery.php @@ -0,0 +1,32 @@ +internalAddGeneratedFile( + "\x0A\xB97\x0A/google/cloud/chronicle/v1/dashboard_query.proto\x12\x19google.cloud.chronicle.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x19google/protobuf/any.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x16google/type/date.proto\x1A\x1Agoogle/type/interval.proto\"\xB5\x05\x0A\x0EDashboardQuery\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x03\xFAA)\x0A'chronicle.googleapis.com/DashboardQuery\x12\x12\x0A\x05query\x18\x02 \x01(\x09B\x03\xE0A\x02\x12C\x0A\x05input\x18\x03 \x01(\x0B2/.google.cloud.chronicle.v1.DashboardQuery.InputB\x03\xE0A\x02\x12H\x0A\x0Fdashboard_chart\x18\x04 \x01(\x09B/\xE0A\x03\xFAA)\x0A'chronicle.googleapis.com/DashboardChart\x12\x11\x0A\x04etag\x18\x05 \x01(\x09B\x03\xE0A\x01\x1A\x84\x02\x0A\x05Input\x12,\x0A\x0Btime_window\x18\x01 \x01(\x0B2\x15.google.type.IntervalH\x00\x12U\x0A\x0Drelative_time\x18\x03 \x01(\x0B2<.google.cloud.chronicle.v1.DashboardQuery.Input.RelativeTimeH\x00\x1Ah\x0A\x0CRelativeTime\x12;\x0A\x09time_unit\x18\x01 \x01(\x0E2#.google.cloud.chronicle.v1.TimeUnitB\x03\xE0A\x02\x12\x1B\x0A\x0Estart_time_val\x18\x02 \x01(\x03B\x03\xE0A\x02B\x0C\x0A\x0Atime_input:\xA6\x01\xEAA\xA2\x01\x0A'chronicle.googleapis.com/DashboardQuery\x12Uprojects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query}*\x10dashboardQueries2\x0EdashboardQuery\"Y\x0A\x18GetDashboardQueryRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'chronicle.googleapis.com/DashboardQuery\"\xA0\x02\x0A\x1CExecuteDashboardQueryRequest\x12?\x0A\x06parent\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x12'chronicle.googleapis.com/DashboardQuery\x12=\x0A\x05query\x18\x02 \x01(\x0B2).google.cloud.chronicle.v1.DashboardQueryB\x03\xE0A\x02\x12@\x0A\x07filters\x18\x03 \x03(\x0B2*.google.cloud.chronicle.v1.DashboardFilterB\x03\xE0A\x01\x12\x18\x0A\x0Bclear_cache\x18\x04 \x01(\x08B\x03\xE0A\x01\x12\$\x0A\x17use_previous_time_range\x18\x05 \x01(\x08B\x03\xE0A\x01\"\xD6\x05\x0A\x11QueryRuntimeError\x12\x13\x0A\x0Berror_title\x18\x01 \x01(\x09\x12\x19\x0A\x11error_description\x18\x02 \x01(\x09\x12R\x0A\x0Eerror_severity\x18\x03 \x01(\x0E2:.google.cloud.chronicle.v1.QueryRuntimeError.ErrorSeverity\x12X\x0A\x08metadata\x18\x04 \x03(\x0B2F.google.cloud.chronicle.v1.QueryRuntimeError.QueryRuntimeErrorMetadata\x12R\x0A\x0Ewarning_reason\x18\x05 \x01(\x0E2:.google.cloud.chronicle.v1.QueryRuntimeError.WarningReason\x1Aq\x0A\x19QueryRuntimeErrorMetadata\x12E\x0A\x03key\x18\x01 \x01(\x0E28.google.cloud.chronicle.v1.QueryRuntimeError.MetadataKey\x12\x0D\x0A\x05value\x18\x02 \x01(\x09\"H\x0A\x0DErrorSeverity\x12\x1E\x0A\x1AERROR_SEVERITY_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07WARNING\x10\x01\x12\x0A\x0A\x06SEVERE\x10\x02\":\x0A\x0BMetadataKey\x12\x1C\x0A\x18METADATA_KEY_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09ROW_LIMIT\x10\x01\"\x95\x01\x0A\x0DWarningReason\x12\x1E\x0A\x1AWARNING_REASON_UNSPECIFIED\x10\x00\x12\x16\x0A\x12ROW_LIMIT_EXCEEDED\x10\x01\x12\x1E\x0A\x1ADEFAULT_ROW_LIMIT_EXCEEDED\x10\x02\x12,\x0A(CURATED_QUERY_DEFAULT_ROW_LIMIT_EXCEEDED\x10\x03\"\xC2\x0B\x0A\x1DExecuteDashboardQueryResponse\x12T\x0A\x07results\x18\x01 \x03(\x0B2C.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnData\x12;\x0A\x0Cdata_sources\x18\x03 \x03(\x0E2%.google.cloud.chronicle.v1.DataSource\x12J\x0A!last_backend_cache_refreshed_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x01\x12*\x0A\x0Btime_window\x18\x05 \x01(\x0B2\x15.google.type.Interval\x12J\x0A\x14query_runtime_errors\x18\x06 \x03(\x0B2,.google.cloud.chronicle.v1.QueryRuntimeError\x12J\x0A\x11language_features\x18\x07 \x03(\x0E2*.google.cloud.chronicle.v1.LanguageFeatureB\x03\xE0A\x01\x1A\xA6\x04\x0A\x0BColumnValue\x12\x12\x0A\x08null_val\x18\x01 \x01(\x08H\x00\x12\x12\x0A\x08bool_val\x18\x02 \x01(\x08H\x00\x12\x13\x0A\x09bytes_val\x18\x03 \x01(\x0CH\x00\x12\x14\x0A\x0Adouble_val\x18\x04 \x01(\x01H\x00\x12\x13\x0A\x09int64_val\x18\x05 \x01(\x03H\x00\x12\x14\x0A\x0Auint64_val\x18\x06 \x01(\x04H\x00\x12\x14\x0A\x0Astring_val\x18\x07 \x01(\x09H\x00\x123\x0A\x0Dtimestamp_val\x18\x08 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00\x12%\x0A\x08date_val\x18\x09 \x01(\x0B2\x11.google.type.DateH\x00\x12)\x0A\x09proto_val\x18\x0A \x01(\x0B2\x14.google.protobuf.AnyH\x00\x12d\x0A\x08metadata\x18\x0B \x01(\x0B2R.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue.ValueMetadata\x1A\x8C\x01\x0A\x0DValueMetadata\x123\x0A\x05links\x18\x01 \x03(\x0B2\$.google.cloud.chronicle.v1.InAppLink\x12\x13\x0A\x0Bfield_paths\x18\x02 \x03(\x09\x121\x0A\x0Dtimestamp_val\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x07\x0A\x05value\x1A\xA3\x02\x0A\x0AColumnType\x12U\x0A\x05value\x18\x01 \x01(\x0B2D.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValueH\x00\x12X\x0A\x04list\x18\x02 \x01(\x0B2H.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType.ListH\x00\x1A\\\x0A\x04List\x12T\x0A\x06values\x18\x01 \x03(\x0B2D.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValueB\x06\x0A\x04type\x1A\xAE\x01\x0A\x0AColumnData\x12\x0E\x0A\x06column\x18\x01 \x01(\x09\x12S\x0A\x06values\x18\x02 \x03(\x0B2C.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType\x12;\x0A\x08metadata\x18\x03 \x01(\x0B2).google.cloud.chronicle.v1.ColumnMetadata\"\xF4\x03\x0A\x0FDashboardFilter\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12:\x0A\x0Bdata_source\x18\x02 \x01(\x0E2%.google.cloud.chronicle.v1.DataSource\x12\x12\x0A\x0Afield_path\x18\x03 \x01(\x09\x12\\\x0A filter_operator_and_field_values\x18\x04 \x03(\x0B22.google.cloud.chronicle.v1.FilterOperatorAndValues\x12\x14\x0A\x0Cdisplay_name\x18\x05 \x01(\x09\x12\x11\x0A\x09chart_ids\x18\x06 \x03(\x09\x12*\x0A\x1Dis_standard_time_range_filter\x18\x07 \x01(\x08B\x03\xE0A\x01\x12\x19\x0A\x0Cis_mandatory\x18\x08 \x01(\x08B\x03\xE0A\x01\x127\x0A%is_standard_time_range_filter_enabled\x18\x09 \x01(\x08B\x03\xE0A\x01H\x00\x88\x01\x01\x12T\x0A\x16advanced_filter_config\x18\x0A \x01(\x0B2/.google.cloud.chronicle.v1.AdvancedFilterConfigB\x03\xE0A\x01B(\x0A&_is_standard_time_range_filter_enabled\"s\x0A\x17FilterOperatorAndValues\x12B\x0A\x0Ffilter_operator\x18\x01 \x01(\x0E2).google.cloud.chronicle.v1.FilterOperator\x12\x14\x0A\x0Cfield_values\x18\x02 \x03(\x09\"\xC6\x05\x0A\x14AdvancedFilterConfig\x12\x12\x0A\x05token\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x06prefix\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06suffix\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09separator\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x1D\x0A\x10multiple_allowed\x18\x05 \x01(\x08B\x03\xE0A\x01\x12\x1B\x0A\x0Edefault_values\x18\x06 \x03(\x09B\x03\xE0A\x01\x12!\x0A\x14skip_default_affixes\x18\x07 \x01(\x08B\x03\xE0A\x01\x12V\x0A\x0Cvalue_source\x18\x08 \x01(\x0B2;.google.cloud.chronicle.v1.AdvancedFilterConfig.ValueSourceB\x03\xE0A\x02\x1A\xD1\x01\x0A\x0BValueSource\x12\\\x0A\x0Emanual_options\x18\x01 \x01(\x0B2=.google.cloud.chronicle.v1.AdvancedFilterConfig.ManualOptionsB\x03\xE0A\x01H\x00\x12Z\x0A\x0Dquery_options\x18\x02 \x01(\x0B2<.google.cloud.chronicle.v1.AdvancedFilterConfig.QueryOptionsB\x03\xE0A\x01H\x00B\x08\x0A\x06source\x1A%\x0A\x0DManualOptions\x12\x14\x0A\x07options\x18\x01 \x03(\x09B\x03\xE0A\x01\x1A\xA5\x01\x0A\x0CQueryOptions\x12\x12\x0A\x05query\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x06column\x18\x02 \x01(\x09B\x03\xE0A\x02\x12'\x0A\x1Aglobal_time_filter_enabled\x18\x03 \x01(\x08B\x03\xE0A\x01\x12C\x0A\x05input\x18\x04 \x01(\x0B2/.google.cloud.chronicle.v1.DashboardQuery.InputB\x03\xE0A\x01\"9\x0A\x09InAppLink\x12\x0B\x0A\x03url\x18\x01 \x01(\x09\x12\x0D\x0A\x05label\x18\x02 \x01(\x09\x12\x10\x0A\x08icon_url\x18\x03 \x01(\x09\"\xB5\x02\x0A\x0EColumnMetadata\x12\x0E\x0A\x06column\x18\x01 \x01(\x09\x12\x12\x0A\x0Afield_path\x18\x02 \x01(\x09\x12\x15\x0A\x0Dfunction_name\x18\x03 \x01(\x09\x12\x17\x0A\x0Ffunction_module\x18\x04 \x01(\x09\x12:\x0A\x0Bdata_source\x18\x05 \x01(\x0E2%.google.cloud.chronicle.v1.DataSource\x12H\x0A\x12timestamp_metadata\x18\x06 \x01(\x0B2,.google.cloud.chronicle.v1.TimestampMetadata\x12\x11\x0A\x09longitude\x18\x07 \x01(\x08\x12\x10\x0A\x08latitude\x18\x08 \x01(\x08\x12\x10\x0A\x08selected\x18\x09 \x01(\x08\x12\x12\x0A\x0Aunselected\x18\x0A \x01(\x08\"\x83\x01\x0A\x11TimestampMetadata\x12\x13\x0A\x0Btime_format\x18\x01 \x01(\x09\x12\x11\x0A\x09time_zone\x18\x02 \x01(\x09\x12\x18\x0A\x10time_granularity\x18\x03 \x01(\x09\x12\x13\x0A\x0Bis_sortable\x18\x04 \x01(\x08\x12\x17\x0A\x0Fis_interpolable\x18\x05 \x01(\x08*[\x0A\x0FLanguageFeature\x12 \x0A\x1CLANGUAGE_FEATURE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05JOINS\x10\x01\x12\x0A\x0A\x06STAGES\x10\x02\x12\x0F\x0A\x0BDATA_TABLES\x10\x03*\xE4\x02\x0A\x0EFilterOperator\x12\x1F\x0A\x1BFILTER_OPERATOR_UNSPECIFIED\x10\x00\x12\x09\x0A\x05EQUAL\x10\x01\x12\x0D\x0A\x09NOT_EQUAL\x10\x02\x12\x06\x0A\x02IN\x10\x03\x12\x10\x0A\x0CGREATER_THAN\x10\x04\x12\x1C\x0A\x18GREATER_THAN_OR_EQUAL_TO\x10\x05\x12\x0D\x0A\x09LESS_THAN\x10\x06\x12\x19\x0A\x15LESS_THAN_OR_EQUAL_TO\x10\x07\x12\x0B\x0A\x07BETWEEN\x10\x08\x12\x08\x0A\x04PAST\x10\x09\x12\x0B\x0A\x07IS_NULL\x10\x0A\x12\x0F\x0A\x0BIS_NOT_NULL\x10\x0B\x12\x0F\x0A\x0BSTARTS_WITH\x10\x0C\x12\x0D\x0A\x09ENDS_WITH\x10\x0D\x12\x18\x0A\x14DOES_NOT_STARTS_WITH\x10\x0E\x12\x16\x0A\x12DOES_NOT_ENDS_WITH\x10\x0F\x12\x0A\x0A\x06NOT_IN\x10\x10\x12\x0C\x0A\x08CONTAINS\x10\x11\x12\x14\x0A\x10DOES_NOT_CONTAIN\x10\x12*\x9A\x02\x0A\x0ADataSource\x12\x1B\x0A\x17DATA_SOURCE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03UDM\x10\x01\x12\x0A\x0A\x06ENTITY\x10\x02\x12\x15\x0A\x11INGESTION_METRICS\x10\x03\x12\x13\x0A\x0FRULE_DETECTIONS\x10\x04\x12\x0C\x0A\x08RULESETS\x10\x05\x12\x0A\x0A\x06GLOBAL\x10\x06\x12\x0F\x0A\x0BIOC_MATCHES\x10\x07\x12\x09\x0A\x05RULES\x10\x08\x12\x0E\x0A\x0ASOAR_CASES\x10\x09\x12\x12\x0A\x0ESOAR_PLAYBOOKS\x10\x0A\x12\x15\x0A\x11SOAR_CASE_HISTORY\x10\x0B\x12\x0E\x0A\x0ADATA_TABLE\x10\x0C\x12\x11\x0A\x0DINVESTIGATION\x10\x0D\x12\x1A\x0A\x16INVESTIGATION_FEEDBACK\x10\x0E*o\x0A\x08TimeUnit\x12\x19\x0A\x15TIME_UNIT_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06SECOND\x10\x01\x12\x0A\x0A\x06MINUTE\x10\x02\x12\x08\x0A\x04HOUR\x10\x03\x12\x07\x0A\x03DAY\x10\x04\x12\x08\x0A\x04WEEK\x10\x05\x12\x09\x0A\x05MONTH\x10\x06\x12\x08\x0A\x04YEAR\x10\x072\xFC\x04\x0A\x15DashboardQueryService\x12\xC4\x01\x0A\x11GetDashboardQuery\x123.google.cloud.chronicle.v1.GetDashboardQueryRequest\x1A).google.cloud.chronicle.v1.DashboardQuery\"O\xDAA\x04name\x82\xD3\xE4\x93\x02B\x12@/v1/{name=projects/*/locations/*/instances/*/dashboardQueries/*}\x12\xEE\x01\x0A\x15ExecuteDashboardQuery\x127.google.cloud.chronicle.v1.ExecuteDashboardQueryRequest\x1A8.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse\"b\xDAA\x0Cparent,query\x82\xD3\xE4\x93\x02M\"H/v1/{parent=projects/*/locations/*/instances/*}/dashboardQueries:execute:\x01*\x1A\xAA\x01\xCAA\x18chronicle.googleapis.com\xD2A\x8B\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xCA\x01\x0A\x1Dcom.google.cloud.chronicle.v1B\x13DashboardQueryProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xAA\x02\x19Google.Cloud.Chronicle.V1\xCA\x02\x19Google\\Cloud\\Chronicle\\V1\xEA\x02\x1CGoogle::Cloud::Chronicle::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/Chronicle/metadata/V1/FeaturedContentMetadata.php b/Chronicle/metadata/V1/FeaturedContentMetadata.php new file mode 100644 index 00000000000..f4fbffb8eaa --- /dev/null +++ b/Chronicle/metadata/V1/FeaturedContentMetadata.php @@ -0,0 +1,26 @@ +internalAddGeneratedFile( + "\x0A\xEA\x06\x0A9google/cloud/chronicle/v1/featured_content_metadata.proto\x12\x19google.cloud.chronicle.v1\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x92\x04\x0A\x17FeaturedContentMetadata\x12\x0F\x0A\x02id\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06author\x18\x05 \x01(\x09B\x03\xE0A\x03\x12\x16\x0A\x09certified\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x07 \x01(\x09B\x03\xE0A\x03\x12\x17\x0A\x0Acategories\x18\x08 \x03(\x09B\x03\xE0A\x03\x12\x14\x0A\x07version\x18\x09 \x01(\x09B\x03\xE0A\x03\x12\x1A\x0A\x08verified\x18\x0A \x01(\x08B\x03\xE0A\x03H\x00\x88\x01\x01\x12^\x0A\x0Bsource_type\x18\x0B \x01(\x0E2D.google.cloud.chronicle.v1.FeaturedContentMetadata.ContentSourceTypeB\x03\xE0A\x03\"`\x0A\x11ContentSourceType\x12#\x0A\x1FCONTENT_SOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06GOOGLE\x10\x01\x12\x0D\x0A\x09COMMUNITY\x10\x02\x12\x0B\x0A\x07PARTNER\x10\x03B\x0B\x0A\x09_verifiedB\xD3\x01\x0A\x1Dcom.google.cloud.chronicle.v1B\x1CFeaturedContentMetadataProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xAA\x02\x19Google.Cloud.Chronicle.V1\xCA\x02\x19Google\\Cloud\\Chronicle\\V1\xEA\x02\x1CGoogle::Cloud::Chronicle::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/Chronicle/metadata/V1/FeaturedContentNativeDashboard.php b/Chronicle/metadata/V1/FeaturedContentNativeDashboard.php new file mode 100644 index 00000000000..b081e08823f --- /dev/null +++ b/Chronicle/metadata/V1/FeaturedContentNativeDashboard.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + "\x0A\x9F\x18\x0AAgoogle/cloud/chronicle/v1/featured_content_native_dashboard.proto\x12\x19google.cloud.chronicle.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A9google/cloud/chronicle/v1/featured_content_metadata.proto\x1A0google/cloud/chronicle/v1/native_dashboard.proto\"\xF5\x03\x0A\x1EFeaturedContentNativeDashboard\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12Q\x0A\x10content_metadata\x18\x02 \x01(\x0B22.google.cloud.chronicle.v1.FeaturedContentMetadataB\x03\xE0A\x03\x12^\x0A\x11dashboard_content\x18\x03 \x01(\x0B2>.google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueriesB\x03\xE0A\x01:\x8C\x02\xEAA\x88\x02\x0A7chronicle.googleapis.com/FeaturedContentNativeDashboard\x12\x8B\x01projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard}*\x1FfeaturedContentNativeDashboards2\x1EfeaturedContentNativeDashboard\"y\x0A(GetFeaturedContentNativeDashboardRequest\x12M\x0A\x04name\x18\x01 \x01(\x09B?\xE0A\x02\xFAA9\x0A7chronicle.googleapis.com/FeaturedContentNativeDashboard\"\xC3\x01\x0A*ListFeaturedContentNativeDashboardsRequest\x12O\x0A\x06parent\x18\x01 \x01(\x09B?\xE0A\x02\xFAA9\x127chronicle.googleapis.com/FeaturedContentNativeDashboard\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\"\xAD\x01\x0A+ListFeaturedContentNativeDashboardsResponse\x12e\x0A\"featured_content_native_dashboards\x18\x01 \x03(\x0B29.google.cloud.chronicle.v1.FeaturedContentNativeDashboard\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xE8\x01\x0A,InstallFeaturedContentNativeDashboardRequest\x12M\x0A\x04name\x18\x01 \x01(\x09B?\xE0A\x02\xFAA9\x0A7chronicle.googleapis.com/FeaturedContentNativeDashboard\x12i\x0A!featured_content_native_dashboard\x18\x02 \x01(\x0B29.google.cloud.chronicle.v1.FeaturedContentNativeDashboardB\x03\xE0A\x01\"{\x0A-InstallFeaturedContentNativeDashboardResponse\x12J\x0A\x10native_dashboard\x18\x01 \x01(\x09B0\xE0A\x01\xFAA*\x0A(chronicle.googleapis.com/NativeDashboard2\xBC\x08\x0A%FeaturedContentNativeDashboardService\x12\x8E\x02\x0A!GetFeaturedContentNativeDashboard\x12C.google.cloud.chronicle.v1.GetFeaturedContentNativeDashboardRequest\x1A9.google.cloud.chronicle.v1.FeaturedContentNativeDashboard\"i\xDAA\x04name\x82\xD3\xE4\x93\x02\\\x12Z/v1/{name=projects/*/locations/*/instances/*/contentHub/featuredContentNativeDashboards/*}\x12\xA1\x02\x0A#ListFeaturedContentNativeDashboards\x12E.google.cloud.chronicle.v1.ListFeaturedContentNativeDashboardsRequest\x1AF.google.cloud.chronicle.v1.ListFeaturedContentNativeDashboardsResponse\"k\xDAA\x06parent\x82\xD3\xE4\x93\x02\\\x12Z/v1/{parent=projects/*/locations/*/instances/*/contentHub}/featuredContentNativeDashboards\x12\xB0\x02\x0A%InstallFeaturedContentNativeDashboard\x12G.google.cloud.chronicle.v1.InstallFeaturedContentNativeDashboardRequest\x1AH.google.cloud.chronicle.v1.InstallFeaturedContentNativeDashboardResponse\"t\xDAA\x04name\x82\xD3\xE4\x93\x02g\"b/v1/{name=projects/*/locations/*/instances/*/contentHub/featuredContentNativeDashboards/*}:install:\x01*\x1A\xAA\x01\xCAA\x18chronicle.googleapis.com\xD2A\x8B\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xE4\x02\x0A\x1Dcom.google.cloud.chronicle.v1B#FeaturedContentNativeDashboardProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xAA\x02\x19Google.Cloud.Chronicle.V1\xCA\x02\x19Google\\Cloud\\Chronicle\\V1\xEA\x02\x1CGoogle::Cloud::Chronicle::V1\xEAA\x86\x01\x0A#chronicle.googleapis.com/ContentHub\x12Gprojects/{project}/locations/{location}/instances/{instance}/contentHub*\x0AcontentHub2\x0AcontentHubb\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/Chronicle/metadata/V1/NativeDashboard.php b/Chronicle/metadata/V1/NativeDashboard.php new file mode 100644 index 00000000000..8d72b35ea39 --- /dev/null +++ b/Chronicle/metadata/V1/NativeDashboard.php @@ -0,0 +1,34 @@ +internalAddGeneratedFile( + "\x0A\x8AF\x0A0google/cloud/chronicle/v1/native_dashboard.proto\x12\x19google.cloud.chronicle.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A/google/cloud/chronicle/v1/dashboard_chart.proto\x1A/google/cloud/chronicle/v1/dashboard_query.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/rpc/status.proto\"u\x0A\x1DExportNativeDashboardsRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x12(chronicle.googleapis.com/NativeDashboard\x12\x12\x0A\x05names\x18\x02 \x03(\x09B\x03\xE0A\x02\"{\x0A\x1EExportNativeDashboardsResponse\x12J\x0A\x12inline_destination\x18\x01 \x01(\x0B2,.google.cloud.chronicle.v1.InlineDestinationH\x00B\x0D\x0A\x0Bdestination\"g\x0A\x11InlineDestination\x12R\x0A\x0Adashboards\x18\x01 \x03(\x0B2>.google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueries\"\xFE\x01\x0A#NativeDashboardWithChartsAndQueries\x12B\x0A\x09dashboard\x18\x01 \x01(\x0B2*.google.cloud.chronicle.v1.NativeDashboardB\x03\xE0A\x01\x12H\x0A\x10dashboard_charts\x18\x02 \x03(\x0B2).google.cloud.chronicle.v1.DashboardChartB\x03\xE0A\x01\x12I\x0A\x11dashboard_queries\x18\x03 \x03(\x0B2).google.cloud.chronicle.v1.DashboardQueryB\x03\xE0A\x01\"\xB5\x01\x0A\x1DImportNativeDashboardsRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x12(chronicle.googleapis.com/NativeDashboard\x12R\x0A\x06source\x18\x02 \x01(\x0B2=.google.cloud.chronicle.v1.ImportNativeDashboardsInlineSourceB\x03\xE0A\x02\"}\x0A\"ImportNativeDashboardsInlineSource\x12W\x0A\x0Adashboards\x18\x01 \x03(\x0B2>.google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueriesB\x03\xE0A\x02\"e\x0A\x1EImportNativeDashboardsResponse\x12C\x0A\x07results\x18\x01 \x03(\x0B2-.google.cloud.chronicle.v1.ImportExportStatusB\x03\xE0A\x03\"P\x0A\x12ImportExportStatus\x12\x11\x0A\x09dashboard\x18\x01 \x01(\x09\x12'\x0A\x06status\x18\x02 \x01(\x0B2\x12.google.rpc.StatusB\x03\xE0A\x03\"\x85\x06\x0A\x0FNativeDashboard\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x03\xFAA*\x0A(chronicle.googleapis.com/NativeDashboard\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x03 \x01(\x09B\x03\xE0A\x01\x12G\x0A\x0Adefinition\x18\x04 \x01(\x0B2..google.cloud.chronicle.v1.DashboardDefinitionB\x03\xE0A\x01\x12;\x0A\x04type\x18\x05 \x01(\x0E2(.google.cloud.chronicle.v1.DashboardTypeB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x1B\x0A\x0Ecreate_user_id\x18\x08 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Eupdate_user_id\x18\x09 \x01(\x09B\x03\xE0A\x03\x12N\x0A\x13dashboard_user_data\x18\x0A \x01(\x0B2,.google.cloud.chronicle.v1.DashboardUserDataB\x03\xE0A\x03\x12\x11\x0A\x04etag\x18\x0B \x01(\x09B\x03\xE0A\x01\x12?\x0A\x06access\x18\x0C \x01(\x0E2*.google.cloud.chronicle.v1.DashboardAccessB\x03\xE0A\x03:\xAC\x01\xEAA\xA8\x01\x0A(chronicle.googleapis.com/NativeDashboard\x12Yprojects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard}*\x10nativeDashboards2\x0FnativeDashboard\"\xAB\x01\x0A\x1CCreateNativeDashboardRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x12(chronicle.googleapis.com/NativeDashboard\x12I\x0A\x10native_dashboard\x18\x02 \x01(\x0B2*.google.cloud.chronicle.v1.NativeDashboardB\x03\xE0A\x02\"\x9E\x01\x0A\x19GetNativeDashboardRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(chronicle.googleapis.com/NativeDashboard\x12A\x0A\x04view\x18\x02 \x01(\x0E2..google.cloud.chronicle.v1.NativeDashboardViewB\x03\xE0A\x01\"\xD3\x01\x0A\x1BListNativeDashboardsRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x12(chronicle.googleapis.com/NativeDashboard\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12A\x0A\x04view\x18\x04 \x01(\x0E2..google.cloud.chronicle.v1.NativeDashboardViewB\x03\xE0A\x01\"~\x0A\x1CListNativeDashboardsResponse\x12E\x0A\x11native_dashboards\x18\x01 \x03(\x0B2*.google.cloud.chronicle.v1.NativeDashboard\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x9F\x01\x0A\x1CUpdateNativeDashboardRequest\x12I\x0A\x10native_dashboard\x18\x01 \x01(\x0B2*.google.cloud.chronicle.v1.NativeDashboardB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\"\xAC\x01\x0A\x1FDuplicateNativeDashboardRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(chronicle.googleapis.com/NativeDashboard\x12I\x0A\x10native_dashboard\x18\x02 \x01(\x0B2*.google.cloud.chronicle.v1.NativeDashboardB\x03\xE0A\x02\"^\x0A\x1CDeleteNativeDashboardRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(chronicle.googleapis.com/NativeDashboard\"\xC6\x02\x0A\x0FAddChartRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(chronicle.googleapis.com/NativeDashboard\x12G\x0A\x0Fdashboard_query\x18\x02 \x01(\x0B2).google.cloud.chronicle.v1.DashboardQueryB\x03\xE0A\x01\x12G\x0A\x0Fdashboard_chart\x18\x03 \x01(\x0B2).google.cloud.chronicle.v1.DashboardChartB\x03\xE0A\x02\x12a\x0A\x0Cchart_layout\x18\x04 \x01(\x0B2F.google.cloud.chronicle.v1.DashboardDefinition.ChartConfig.ChartLayoutB\x03\xE0A\x02\"\x9C\x01\x0A\x10AddChartResponse\x12D\x0A\x10native_dashboard\x18\x01 \x01(\x0B2*.google.cloud.chronicle.v1.NativeDashboard\x12B\x0A\x0Fdashboard_chart\x18\x02 \x01(\x0B2).google.cloud.chronicle.v1.DashboardChart\"\xE4\x02\x0A\x10EditChartRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(chronicle.googleapis.com/NativeDashboard\x12G\x0A\x0Fdashboard_query\x18\x02 \x01(\x0B2).google.cloud.chronicle.v1.DashboardQueryB\x03\xE0A\x01\x12G\x0A\x0Fdashboard_chart\x18\x03 \x01(\x0B2).google.cloud.chronicle.v1.DashboardChartB\x03\xE0A\x01\x122\x0A\x09edit_mask\x18\x04 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x12J\x0A\x11language_features\x18\x05 \x03(\x0E2*.google.cloud.chronicle.v1.LanguageFeatureB\x03\xE0A\x01\"\x9D\x01\x0A\x11EditChartResponse\x12D\x0A\x10native_dashboard\x18\x01 \x01(\x0B2*.google.cloud.chronicle.v1.NativeDashboard\x12B\x0A\x0Fdashboard_chart\x18\x02 \x01(\x0B2).google.cloud.chronicle.v1.DashboardChart\"\x9E\x01\x0A\x12RemoveChartRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(chronicle.googleapis.com/NativeDashboard\x12H\x0A\x0Fdashboard_chart\x18\x02 \x01(\x09B/\xE0A\x02\xFAA)\x0A'chronicle.googleapis.com/DashboardChart\"\xA1\x01\x0A\x15DuplicateChartRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(chronicle.googleapis.com/NativeDashboard\x12H\x0A\x0Fdashboard_chart\x18\x02 \x01(\x09B/\xE0A\x02\xFAA)\x0A'chronicle.googleapis.com/DashboardChart\"\xA2\x01\x0A\x16DuplicateChartResponse\x12D\x0A\x10native_dashboard\x18\x01 \x01(\x0B2*.google.cloud.chronicle.v1.NativeDashboard\x12B\x0A\x0Fdashboard_chart\x18\x02 \x01(\x0B2).google.cloud.chronicle.v1.DashboardChart\"\\\x0A\x11DashboardUserData\x124\x0A\x10last_viewed_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x11\x0A\x09is_pinned\x18\x02 \x01(\x08\"\xF3\x03\x0A\x13DashboardDefinition\x12;\x0A\x07filters\x18\x01 \x03(\x0B2*.google.cloud.chronicle.v1.DashboardFilter\x12\x13\x0A\x0Bfingerprint\x18\x02 \x01(\x09\x12J\x0A\x06charts\x18\x04 \x03(\x0B2:.google.cloud.chronicle.v1.DashboardDefinition.ChartConfig\x1A\xBD\x02\x0A\x0BChartConfig\x12H\x0A\x0Fdashboard_chart\x18\x01 \x01(\x09B/\xE0A\x03\xFAA)\x0A'chronicle.googleapis.com/DashboardChart\x12\\\x0A\x0Cchart_layout\x18\x02 \x01(\x0B2F.google.cloud.chronicle.v1.DashboardDefinition.ChartConfig.ChartLayout\x12\x13\x0A\x0Bfilters_ids\x18\x04 \x03(\x09\x1Aq\x0A\x0BChartLayout\x12\x14\x0A\x07start_x\x18\x09 \x01(\x05H\x00\x88\x01\x01\x12\x0E\x0A\x06span_x\x18\x0A \x01(\x05\x12\x14\x0A\x07start_y\x18\x0B \x01(\x05H\x01\x88\x01\x01\x12\x0E\x0A\x06span_y\x18\x0C \x01(\x05B\x0A\x0A\x08_start_xB\x0A\x0A\x08_start_y*r\x0A\x0DDashboardType\x12\x1E\x0A\x1ADASHBOARD_TYPE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07CURATED\x10\x01\x12\x0B\x0A\x07PRIVATE\x10\x02\x12\x0A\x0A\x06PUBLIC\x10\x03\x12\x0A\x0A\x06CUSTOM\x10\x04\x12\x0F\x0A\x0BMARKETPLACE\x10\x05*`\x0A\x0FDashboardAccess\x12 \x0A\x1CDASHBOARD_ACCESS_UNSPECIFIED\x10\x00\x12\x15\x0A\x11DASHBOARD_PRIVATE\x10\x01\x12\x14\x0A\x10DASHBOARD_PUBLIC\x10\x02*}\x0A\x13NativeDashboardView\x12%\x0A!NATIVE_DASHBOARD_VIEW_UNSPECIFIED\x10\x00\x12\x1F\x0A\x1BNATIVE_DASHBOARD_VIEW_BASIC\x10\x01\x12\x1E\x0A\x1ANATIVE_DASHBOARD_VIEW_FULL\x10\x022\x86\x17\x0A\x16NativeDashboardService\x12\xF2\x01\x0A\x15CreateNativeDashboard\x127.google.cloud.chronicle.v1.CreateNativeDashboardRequest\x1A*.google.cloud.chronicle.v1.NativeDashboard\"t\xDAA\x17parent,native_dashboard\x82\xD3\xE4\x93\x02T\"@/v1/{parent=projects/*/locations/*/instances/*}/nativeDashboards:\x10native_dashboard\x12\xC7\x01\x0A\x12GetNativeDashboard\x124.google.cloud.chronicle.v1.GetNativeDashboardRequest\x1A*.google.cloud.chronicle.v1.NativeDashboard\"O\xDAA\x04name\x82\xD3\xE4\x93\x02B\x12@/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}\x12\xDA\x01\x0A\x14ListNativeDashboards\x126.google.cloud.chronicle.v1.ListNativeDashboardsRequest\x1A7.google.cloud.chronicle.v1.ListNativeDashboardsResponse\"Q\xDAA\x06parent\x82\xD3\xE4\x93\x02B\x12@/v1/{parent=projects/*/locations/*/instances/*}/nativeDashboards\x12\x89\x02\x0A\x15UpdateNativeDashboard\x127.google.cloud.chronicle.v1.UpdateNativeDashboardRequest\x1A*.google.cloud.chronicle.v1.NativeDashboard\"\x8A\x01\xDAA\x1Cnative_dashboard,update_mask\x82\xD3\xE4\x93\x02e2Q/v1/{native_dashboard.name=projects/*/locations/*/instances/*/nativeDashboards/*}:\x10native_dashboard\x12\xF2\x01\x0A\x18DuplicateNativeDashboard\x12:.google.cloud.chronicle.v1.DuplicateNativeDashboardRequest\x1A*.google.cloud.chronicle.v1.NativeDashboard\"n\xDAA\x16name, native_dashboard\x82\xD3\xE4\x93\x02O\"J/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:duplicate:\x01*\x12\xB9\x01\x0A\x15DeleteNativeDashboard\x127.google.cloud.chronicle.v1.DeleteNativeDashboardRequest\x1A\x16.google.protobuf.Empty\"O\xDAA\x04name\x82\xD3\xE4\x93\x02B*@/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}\x12\xE2\x01\x0A\x08AddChart\x12*.google.cloud.chronicle.v1.AddChartRequest\x1A+.google.cloud.chronicle.v1.AddChartResponse\"}\xDAA&name, dashboard_query, dashboard_chart\x82\xD3\xE4\x93\x02N\"I/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:addChart:\x01*\x12\xC8\x01\x0A\x0BRemoveChart\x12-.google.cloud.chronicle.v1.RemoveChartRequest\x1A*.google.cloud.chronicle.v1.NativeDashboard\"^\xDAA\x04name\x82\xD3\xE4\x93\x02Q\"L/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:removeChart:\x01*\x12\xF2\x01\x0A\x09EditChart\x12+.google.cloud.chronicle.v1.EditChartRequest\x1A,.google.cloud.chronicle.v1.EditChartResponse\"\x89\x01\xDAA1name, dashboard_query, dashboard_chart, edit_mask\x82\xD3\xE4\x93\x02O\"J/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:editChart:\x01*\x12\xD8\x01\x0A\x0EDuplicateChart\x120.google.cloud.chronicle.v1.DuplicateChartRequest\x1A1.google.cloud.chronicle.v1.DuplicateChartResponse\"a\xDAA\x04name\x82\xD3\xE4\x93\x02T\"O/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:duplicateChart:\x01*\x12\xF1\x01\x0A\x16ExportNativeDashboards\x128.google.cloud.chronicle.v1.ExportNativeDashboardsRequest\x1A9.google.cloud.chronicle.v1.ExportNativeDashboardsResponse\"b\xDAA\x0Dparent, names\x82\xD3\xE4\x93\x02L\"G/v1/{parent=projects/*/locations/*/instances/*}/nativeDashboards:export:\x01*\x12\xF1\x01\x0A\x16ImportNativeDashboards\x128.google.cloud.chronicle.v1.ImportNativeDashboardsRequest\x1A9.google.cloud.chronicle.v1.ImportNativeDashboardsResponse\"b\xDAA\x0Dparent,source\x82\xD3\xE4\x93\x02L\"G/v1/{parent=projects/*/locations/*/instances/*}/nativeDashboards:import:\x01*\x1A\xAA\x01\xCAA\x18chronicle.googleapis.com\xD2A\x8B\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xCB\x01\x0A\x1Dcom.google.cloud.chronicle.v1B\x14NativeDashboardProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xAA\x02\x19Google.Cloud.Chronicle.V1\xCA\x02\x19Google\\Cloud\\Chronicle\\V1\xEA\x02\x1CGoogle::Cloud::Chronicle::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/Chronicle/samples/V1/BigQueryExportServiceClient/get_big_query_export.php b/Chronicle/samples/V1/BigQueryExportServiceClient/get_big_query_export.php new file mode 100644 index 00000000000..449de6c7716 --- /dev/null +++ b/Chronicle/samples/V1/BigQueryExportServiceClient/get_big_query_export.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var BigQueryExport $response */ + $response = $bigQueryExportServiceClient->getBigQueryExport($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = BigQueryExportServiceClient::bigQueryExportName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]' + ); + + get_big_query_export_sample($formattedName); +} +// [END chronicle_v1_generated_BigQueryExportService_GetBigQueryExport_sync] diff --git a/Chronicle/samples/V1/BigQueryExportServiceClient/provision_big_query_export.php b/Chronicle/samples/V1/BigQueryExportServiceClient/provision_big_query_export.php new file mode 100644 index 00000000000..c068f46e5ac --- /dev/null +++ b/Chronicle/samples/V1/BigQueryExportServiceClient/provision_big_query_export.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var BigQueryExport $response */ + $response = $bigQueryExportServiceClient->provisionBigQueryExport($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = BigQueryExportServiceClient::instanceName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]' + ); + + provision_big_query_export_sample($formattedParent); +} +// [END chronicle_v1_generated_BigQueryExportService_ProvisionBigQueryExport_sync] diff --git a/Chronicle/samples/V1/BigQueryExportServiceClient/update_big_query_export.php b/Chronicle/samples/V1/BigQueryExportServiceClient/update_big_query_export.php new file mode 100644 index 00000000000..96ce9e19f5c --- /dev/null +++ b/Chronicle/samples/V1/BigQueryExportServiceClient/update_big_query_export.php @@ -0,0 +1,59 @@ +setBigQueryExport($bigQueryExport); + + // Call the API and handle any network failures. + try { + /** @var BigQueryExport $response */ + $response = $bigQueryExportServiceClient->updateBigQueryExport($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END chronicle_v1_generated_BigQueryExportService_UpdateBigQueryExport_sync] diff --git a/Chronicle/samples/V1/DashboardChartServiceClient/batch_get_dashboard_charts.php b/Chronicle/samples/V1/DashboardChartServiceClient/batch_get_dashboard_charts.php new file mode 100644 index 00000000000..66f67ce6e53 --- /dev/null +++ b/Chronicle/samples/V1/DashboardChartServiceClient/batch_get_dashboard_charts.php @@ -0,0 +1,91 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchGetDashboardChartsResponse $response */ + $response = $dashboardChartServiceClient->batchGetDashboardCharts($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DashboardChartServiceClient::instanceName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]' + ); + $formattedNamesElement = DashboardChartServiceClient::dashboardChartName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[CHART]' + ); + + batch_get_dashboard_charts_sample($formattedParent, $formattedNamesElement); +} +// [END chronicle_v1_generated_DashboardChartService_BatchGetDashboardCharts_sync] diff --git a/Chronicle/samples/V1/DashboardChartServiceClient/get_dashboard_chart.php b/Chronicle/samples/V1/DashboardChartServiceClient/get_dashboard_chart.php new file mode 100644 index 00000000000..423aa931ff5 --- /dev/null +++ b/Chronicle/samples/V1/DashboardChartServiceClient/get_dashboard_chart.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DashboardChart $response */ + $response = $dashboardChartServiceClient->getDashboardChart($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DashboardChartServiceClient::dashboardChartName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[CHART]' + ); + + get_dashboard_chart_sample($formattedName); +} +// [END chronicle_v1_generated_DashboardChartService_GetDashboardChart_sync] diff --git a/Chronicle/samples/V1/DashboardQueryServiceClient/execute_dashboard_query.php b/Chronicle/samples/V1/DashboardQueryServiceClient/execute_dashboard_query.php new file mode 100644 index 00000000000..43ee3d3b78f --- /dev/null +++ b/Chronicle/samples/V1/DashboardQueryServiceClient/execute_dashboard_query.php @@ -0,0 +1,85 @@ +setQuery($queryQuery) + ->setInput($queryInput); + $request = (new ExecuteDashboardQueryRequest()) + ->setParent($formattedParent) + ->setQuery($query); + + // Call the API and handle any network failures. + try { + /** @var ExecuteDashboardQueryResponse $response */ + $response = $dashboardQueryServiceClient->executeDashboardQuery($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DashboardQueryServiceClient::instanceName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]' + ); + $queryQuery = '[QUERY]'; + + execute_dashboard_query_sample($formattedParent, $queryQuery); +} +// [END chronicle_v1_generated_DashboardQueryService_ExecuteDashboardQuery_sync] diff --git a/Chronicle/samples/V1/DashboardQueryServiceClient/get_dashboard_query.php b/Chronicle/samples/V1/DashboardQueryServiceClient/get_dashboard_query.php new file mode 100644 index 00000000000..0065d62b4ec --- /dev/null +++ b/Chronicle/samples/V1/DashboardQueryServiceClient/get_dashboard_query.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DashboardQuery $response */ + $response = $dashboardQueryServiceClient->getDashboardQuery($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DashboardQueryServiceClient::dashboardQueryName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[QUERY]' + ); + + get_dashboard_query_sample($formattedName); +} +// [END chronicle_v1_generated_DashboardQueryService_GetDashboardQuery_sync] diff --git a/Chronicle/samples/V1/FeaturedContentNativeDashboardServiceClient/get_featured_content_native_dashboard.php b/Chronicle/samples/V1/FeaturedContentNativeDashboardServiceClient/get_featured_content_native_dashboard.php new file mode 100644 index 00000000000..fe4828f66e9 --- /dev/null +++ b/Chronicle/samples/V1/FeaturedContentNativeDashboardServiceClient/get_featured_content_native_dashboard.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var FeaturedContentNativeDashboard $response */ + $response = $featuredContentNativeDashboardServiceClient->getFeaturedContentNativeDashboard( + $request + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FeaturedContentNativeDashboardServiceClient::featuredContentNativeDashboardName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[FEATURED_CONTENT_NATIVE_DASHBOARD]' + ); + + get_featured_content_native_dashboard_sample($formattedName); +} +// [END chronicle_v1_generated_FeaturedContentNativeDashboardService_GetFeaturedContentNativeDashboard_sync] diff --git a/Chronicle/samples/V1/FeaturedContentNativeDashboardServiceClient/install_featured_content_native_dashboard.php b/Chronicle/samples/V1/FeaturedContentNativeDashboardServiceClient/install_featured_content_native_dashboard.php new file mode 100644 index 00000000000..36d013db73d --- /dev/null +++ b/Chronicle/samples/V1/FeaturedContentNativeDashboardServiceClient/install_featured_content_native_dashboard.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var InstallFeaturedContentNativeDashboardResponse $response */ + $response = $featuredContentNativeDashboardServiceClient->installFeaturedContentNativeDashboard( + $request + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FeaturedContentNativeDashboardServiceClient::featuredContentNativeDashboardName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[FEATURED_CONTENT_NATIVE_DASHBOARD]' + ); + + install_featured_content_native_dashboard_sample($formattedName); +} +// [END chronicle_v1_generated_FeaturedContentNativeDashboardService_InstallFeaturedContentNativeDashboard_sync] diff --git a/Chronicle/samples/V1/FeaturedContentNativeDashboardServiceClient/list_featured_content_native_dashboards.php b/Chronicle/samples/V1/FeaturedContentNativeDashboardServiceClient/list_featured_content_native_dashboards.php new file mode 100644 index 00000000000..411b56b48a1 --- /dev/null +++ b/Chronicle/samples/V1/FeaturedContentNativeDashboardServiceClient/list_featured_content_native_dashboards.php @@ -0,0 +1,84 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $featuredContentNativeDashboardServiceClient->listFeaturedContentNativeDashboards( + $request + ); + + /** @var FeaturedContentNativeDashboard $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FeaturedContentNativeDashboardServiceClient::contentHubName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]' + ); + + list_featured_content_native_dashboards_sample($formattedParent); +} +// [END chronicle_v1_generated_FeaturedContentNativeDashboardService_ListFeaturedContentNativeDashboards_sync] diff --git a/Chronicle/samples/V1/NativeDashboardServiceClient/add_chart.php b/Chronicle/samples/V1/NativeDashboardServiceClient/add_chart.php new file mode 100644 index 00000000000..72e37f68b09 --- /dev/null +++ b/Chronicle/samples/V1/NativeDashboardServiceClient/add_chart.php @@ -0,0 +1,90 @@ +setDisplayName($dashboardChartDisplayName) + ->setVisualization($dashboardChartVisualization); + $chartLayout = new ChartLayout(); + $request = (new AddChartRequest()) + ->setName($formattedName) + ->setDashboardChart($dashboardChart) + ->setChartLayout($chartLayout); + + // Call the API and handle any network failures. + try { + /** @var AddChartResponse $response */ + $response = $nativeDashboardServiceClient->addChart($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NativeDashboardServiceClient::nativeDashboardName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DASHBOARD]' + ); + $dashboardChartDisplayName = '[DISPLAY_NAME]'; + + add_chart_sample($formattedName, $dashboardChartDisplayName); +} +// [END chronicle_v1_generated_NativeDashboardService_AddChart_sync] diff --git a/Chronicle/samples/V1/NativeDashboardServiceClient/create_native_dashboard.php b/Chronicle/samples/V1/NativeDashboardServiceClient/create_native_dashboard.php new file mode 100644 index 00000000000..4f21c73ab36 --- /dev/null +++ b/Chronicle/samples/V1/NativeDashboardServiceClient/create_native_dashboard.php @@ -0,0 +1,83 @@ +setDisplayName($nativeDashboardDisplayName); + $request = (new CreateNativeDashboardRequest()) + ->setParent($formattedParent) + ->setNativeDashboard($nativeDashboard); + + // Call the API and handle any network failures. + try { + /** @var NativeDashboard $response */ + $response = $nativeDashboardServiceClient->createNativeDashboard($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NativeDashboardServiceClient::instanceName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]' + ); + $nativeDashboardDisplayName = '[DISPLAY_NAME]'; + + create_native_dashboard_sample($formattedParent, $nativeDashboardDisplayName); +} +// [END chronicle_v1_generated_NativeDashboardService_CreateNativeDashboard_sync] diff --git a/Chronicle/samples/V1/NativeDashboardServiceClient/delete_native_dashboard.php b/Chronicle/samples/V1/NativeDashboardServiceClient/delete_native_dashboard.php new file mode 100644 index 00000000000..68ec8e4fb93 --- /dev/null +++ b/Chronicle/samples/V1/NativeDashboardServiceClient/delete_native_dashboard.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $nativeDashboardServiceClient->deleteNativeDashboard($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NativeDashboardServiceClient::nativeDashboardName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DASHBOARD]' + ); + + delete_native_dashboard_sample($formattedName); +} +// [END chronicle_v1_generated_NativeDashboardService_DeleteNativeDashboard_sync] diff --git a/Chronicle/samples/V1/NativeDashboardServiceClient/duplicate_chart.php b/Chronicle/samples/V1/NativeDashboardServiceClient/duplicate_chart.php new file mode 100644 index 00000000000..4e391f36062 --- /dev/null +++ b/Chronicle/samples/V1/NativeDashboardServiceClient/duplicate_chart.php @@ -0,0 +1,87 @@ +setName($formattedName) + ->setDashboardChart($formattedDashboardChart); + + // Call the API and handle any network failures. + try { + /** @var DuplicateChartResponse $response */ + $response = $nativeDashboardServiceClient->duplicateChart($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NativeDashboardServiceClient::nativeDashboardName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DASHBOARD]' + ); + $formattedDashboardChart = NativeDashboardServiceClient::dashboardChartName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[CHART]' + ); + + duplicate_chart_sample($formattedName, $formattedDashboardChart); +} +// [END chronicle_v1_generated_NativeDashboardService_DuplicateChart_sync] diff --git a/Chronicle/samples/V1/NativeDashboardServiceClient/duplicate_native_dashboard.php b/Chronicle/samples/V1/NativeDashboardServiceClient/duplicate_native_dashboard.php new file mode 100644 index 00000000000..33cfc432d36 --- /dev/null +++ b/Chronicle/samples/V1/NativeDashboardServiceClient/duplicate_native_dashboard.php @@ -0,0 +1,85 @@ +setDisplayName($nativeDashboardDisplayName); + $request = (new DuplicateNativeDashboardRequest()) + ->setName($formattedName) + ->setNativeDashboard($nativeDashboard); + + // Call the API and handle any network failures. + try { + /** @var NativeDashboard $response */ + $response = $nativeDashboardServiceClient->duplicateNativeDashboard($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NativeDashboardServiceClient::nativeDashboardName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DASHBOARD]' + ); + $nativeDashboardDisplayName = '[DISPLAY_NAME]'; + + duplicate_native_dashboard_sample($formattedName, $nativeDashboardDisplayName); +} +// [END chronicle_v1_generated_NativeDashboardService_DuplicateNativeDashboard_sync] diff --git a/Chronicle/samples/V1/NativeDashboardServiceClient/edit_chart.php b/Chronicle/samples/V1/NativeDashboardServiceClient/edit_chart.php new file mode 100644 index 00000000000..ee90db305e9 --- /dev/null +++ b/Chronicle/samples/V1/NativeDashboardServiceClient/edit_chart.php @@ -0,0 +1,81 @@ +setName($formattedName) + ->setEditMask($editMask); + + // Call the API and handle any network failures. + try { + /** @var EditChartResponse $response */ + $response = $nativeDashboardServiceClient->editChart($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NativeDashboardServiceClient::nativeDashboardName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DASHBOARD]' + ); + + edit_chart_sample($formattedName); +} +// [END chronicle_v1_generated_NativeDashboardService_EditChart_sync] diff --git a/Chronicle/samples/V1/NativeDashboardServiceClient/export_native_dashboards.php b/Chronicle/samples/V1/NativeDashboardServiceClient/export_native_dashboards.php new file mode 100644 index 00000000000..bf7a4303ac1 --- /dev/null +++ b/Chronicle/samples/V1/NativeDashboardServiceClient/export_native_dashboards.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setNames($names); + + // Call the API and handle any network failures. + try { + /** @var ExportNativeDashboardsResponse $response */ + $response = $nativeDashboardServiceClient->exportNativeDashboards($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NativeDashboardServiceClient::instanceName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]' + ); + $namesElement = '[NAMES]'; + + export_native_dashboards_sample($formattedParent, $namesElement); +} +// [END chronicle_v1_generated_NativeDashboardService_ExportNativeDashboards_sync] diff --git a/Chronicle/samples/V1/NativeDashboardServiceClient/get_native_dashboard.php b/Chronicle/samples/V1/NativeDashboardServiceClient/get_native_dashboard.php new file mode 100644 index 00000000000..ffa530d192c --- /dev/null +++ b/Chronicle/samples/V1/NativeDashboardServiceClient/get_native_dashboard.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var NativeDashboard $response */ + $response = $nativeDashboardServiceClient->getNativeDashboard($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NativeDashboardServiceClient::nativeDashboardName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DASHBOARD]' + ); + + get_native_dashboard_sample($formattedName); +} +// [END chronicle_v1_generated_NativeDashboardService_GetNativeDashboard_sync] diff --git a/Chronicle/samples/V1/NativeDashboardServiceClient/import_native_dashboards.php b/Chronicle/samples/V1/NativeDashboardServiceClient/import_native_dashboards.php new file mode 100644 index 00000000000..e15ab48e5b8 --- /dev/null +++ b/Chronicle/samples/V1/NativeDashboardServiceClient/import_native_dashboards.php @@ -0,0 +1,82 @@ +setDashboards($sourceDashboards); + $request = (new ImportNativeDashboardsRequest()) + ->setParent($formattedParent) + ->setSource($source); + + // Call the API and handle any network failures. + try { + /** @var ImportNativeDashboardsResponse $response */ + $response = $nativeDashboardServiceClient->importNativeDashboards($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NativeDashboardServiceClient::instanceName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]' + ); + + import_native_dashboards_sample($formattedParent); +} +// [END chronicle_v1_generated_NativeDashboardService_ImportNativeDashboards_sync] diff --git a/Chronicle/samples/V1/NativeDashboardServiceClient/list_native_dashboards.php b/Chronicle/samples/V1/NativeDashboardServiceClient/list_native_dashboards.php new file mode 100644 index 00000000000..349d0721547 --- /dev/null +++ b/Chronicle/samples/V1/NativeDashboardServiceClient/list_native_dashboards.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $nativeDashboardServiceClient->listNativeDashboards($request); + + /** @var NativeDashboard $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NativeDashboardServiceClient::instanceName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]' + ); + + list_native_dashboards_sample($formattedParent); +} +// [END chronicle_v1_generated_NativeDashboardService_ListNativeDashboards_sync] diff --git a/Chronicle/samples/V1/NativeDashboardServiceClient/remove_chart.php b/Chronicle/samples/V1/NativeDashboardServiceClient/remove_chart.php new file mode 100644 index 00000000000..7c163002814 --- /dev/null +++ b/Chronicle/samples/V1/NativeDashboardServiceClient/remove_chart.php @@ -0,0 +1,87 @@ +setName($formattedName) + ->setDashboardChart($formattedDashboardChart); + + // Call the API and handle any network failures. + try { + /** @var NativeDashboard $response */ + $response = $nativeDashboardServiceClient->removeChart($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NativeDashboardServiceClient::nativeDashboardName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[DASHBOARD]' + ); + $formattedDashboardChart = NativeDashboardServiceClient::dashboardChartName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[CHART]' + ); + + remove_chart_sample($formattedName, $formattedDashboardChart); +} +// [END chronicle_v1_generated_NativeDashboardService_RemoveChart_sync] diff --git a/Chronicle/samples/V1/NativeDashboardServiceClient/update_native_dashboard.php b/Chronicle/samples/V1/NativeDashboardServiceClient/update_native_dashboard.php new file mode 100644 index 00000000000..04f2a4465e8 --- /dev/null +++ b/Chronicle/samples/V1/NativeDashboardServiceClient/update_native_dashboard.php @@ -0,0 +1,75 @@ +setDisplayName($nativeDashboardDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateNativeDashboardRequest()) + ->setNativeDashboard($nativeDashboard) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var NativeDashboard $response */ + $response = $nativeDashboardServiceClient->updateNativeDashboard($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $nativeDashboardDisplayName = '[DISPLAY_NAME]'; + + update_native_dashboard_sample($nativeDashboardDisplayName); +} +// [END chronicle_v1_generated_NativeDashboardService_UpdateNativeDashboard_sync] diff --git a/Chronicle/src/V1/AddChartRequest.php b/Chronicle/src/V1/AddChartRequest.php new file mode 100644 index 00000000000..2cc4250997a --- /dev/null +++ b/Chronicle/src/V1/AddChartRequest.php @@ -0,0 +1,227 @@ +google.cloud.chronicle.v1.AddChartRequest + */ +class AddChartRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The dashboard name to add chart in. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Query used to create the chart. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardQuery dashboard_query = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $dashboard_query = null; + /** + * Required. Chart to be added to the dashboard. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart dashboard_chart = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dashboard_chart = null; + /** + * Required. ChartLayout for newly added chart. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardDefinition.ChartConfig.ChartLayout chart_layout = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $chart_layout = null; + + /** + * @param string $name Required. The dashboard name to add chart in. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * Please see {@see NativeDashboardServiceClient::nativeDashboardName()} for help formatting this field. + * @param \Google\Cloud\Chronicle\V1\DashboardQuery $dashboardQuery Optional. Query used to create the chart. + * @param \Google\Cloud\Chronicle\V1\DashboardChart $dashboardChart Required. Chart to be added to the dashboard. + * + * @return \Google\Cloud\Chronicle\V1\AddChartRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\Chronicle\V1\DashboardQuery $dashboardQuery, \Google\Cloud\Chronicle\V1\DashboardChart $dashboardChart): self + { + return (new self()) + ->setName($name) + ->setDashboardQuery($dashboardQuery) + ->setDashboardChart($dashboardChart); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The dashboard name to add chart in. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * @type \Google\Cloud\Chronicle\V1\DashboardQuery $dashboard_query + * Optional. Query used to create the chart. + * @type \Google\Cloud\Chronicle\V1\DashboardChart $dashboard_chart + * Required. Chart to be added to the dashboard. + * @type \Google\Cloud\Chronicle\V1\DashboardDefinition\ChartConfig\ChartLayout $chart_layout + * Required. ChartLayout for newly added chart. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Required. The dashboard name to add chart in. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The dashboard name to add chart in. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Query used to create the chart. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardQuery dashboard_query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardQuery|null + */ + public function getDashboardQuery() + { + return $this->dashboard_query; + } + + public function hasDashboardQuery() + { + return isset($this->dashboard_query); + } + + public function clearDashboardQuery() + { + unset($this->dashboard_query); + } + + /** + * Optional. Query used to create the chart. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardQuery dashboard_query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardQuery $var + * @return $this + */ + public function setDashboardQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardQuery::class); + $this->dashboard_query = $var; + + return $this; + } + + /** + * Required. Chart to be added to the dashboard. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart dashboard_chart = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\DashboardChart|null + */ + public function getDashboardChart() + { + return $this->dashboard_chart; + } + + public function hasDashboardChart() + { + return isset($this->dashboard_chart); + } + + public function clearDashboardChart() + { + unset($this->dashboard_chart); + } + + /** + * Required. Chart to be added to the dashboard. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart dashboard_chart = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart $var + * @return $this + */ + public function setDashboardChart($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart::class); + $this->dashboard_chart = $var; + + return $this; + } + + /** + * Required. ChartLayout for newly added chart. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardDefinition.ChartConfig.ChartLayout chart_layout = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\DashboardDefinition\ChartConfig\ChartLayout|null + */ + public function getChartLayout() + { + return $this->chart_layout; + } + + public function hasChartLayout() + { + return isset($this->chart_layout); + } + + public function clearChartLayout() + { + unset($this->chart_layout); + } + + /** + * Required. ChartLayout for newly added chart. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardDefinition.ChartConfig.ChartLayout chart_layout = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\DashboardDefinition\ChartConfig\ChartLayout $var + * @return $this + */ + public function setChartLayout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardDefinition\ChartConfig\ChartLayout::class); + $this->chart_layout = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/AddChartResponse.php b/Chronicle/src/V1/AddChartResponse.php new file mode 100644 index 00000000000..a07f0fc6420 --- /dev/null +++ b/Chronicle/src/V1/AddChartResponse.php @@ -0,0 +1,121 @@ +google.cloud.chronicle.v1.AddChartResponse + */ +class AddChartResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Dashboard with chart added in definition. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard native_dashboard = 1; + */ + protected $native_dashboard = null; + /** + * Created chart resource. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart dashboard_chart = 2; + */ + protected $dashboard_chart = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\NativeDashboard $native_dashboard + * Dashboard with chart added in definition. + * @type \Google\Cloud\Chronicle\V1\DashboardChart $dashboard_chart + * Created chart resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Dashboard with chart added in definition. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard native_dashboard = 1; + * @return \Google\Cloud\Chronicle\V1\NativeDashboard|null + */ + public function getNativeDashboard() + { + return $this->native_dashboard; + } + + public function hasNativeDashboard() + { + return isset($this->native_dashboard); + } + + public function clearNativeDashboard() + { + unset($this->native_dashboard); + } + + /** + * Dashboard with chart added in definition. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard native_dashboard = 1; + * @param \Google\Cloud\Chronicle\V1\NativeDashboard $var + * @return $this + */ + public function setNativeDashboard($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\NativeDashboard::class); + $this->native_dashboard = $var; + + return $this; + } + + /** + * Created chart resource. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart dashboard_chart = 2; + * @return \Google\Cloud\Chronicle\V1\DashboardChart|null + */ + public function getDashboardChart() + { + return $this->dashboard_chart; + } + + public function hasDashboardChart() + { + return isset($this->dashboard_chart); + } + + public function clearDashboardChart() + { + unset($this->dashboard_chart); + } + + /** + * Created chart resource. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart dashboard_chart = 2; + * @param \Google\Cloud\Chronicle\V1\DashboardChart $var + * @return $this + */ + public function setDashboardChart($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart::class); + $this->dashboard_chart = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/AdvancedFilterConfig.php b/Chronicle/src/V1/AdvancedFilterConfig.php new file mode 100644 index 00000000000..38f79af8c7c --- /dev/null +++ b/Chronicle/src/V1/AdvancedFilterConfig.php @@ -0,0 +1,339 @@ +google.cloud.chronicle.v1.AdvancedFilterConfig + */ +class AdvancedFilterConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The token name to look for in the query (e.g., "hostname"). + * The system will automatically wrap this in '$' (e.g., "$hostname$"). + * + * Generated from protobuf field string token = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $token = ''; + /** + * Optional. String to prepend to the final replaced value (e.g., "/", "^(", + * "\""). + * + * Generated from protobuf field string prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $prefix = ''; + /** + * Optional. String to append to the final replaced value (e.g., "/", ")$", + * "\""). + * + * Generated from protobuf field string suffix = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $suffix = ''; + /** + * Optional. Delimiter to join multiple selected values (e.g., "|", " OR field + * = "). + * + * Generated from protobuf field string separator = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $separator = ''; + /** + * Optional. Whether to allow selection of multiple values. + * + * Generated from protobuf field bool multiple_allowed = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $multiple_allowed = false; + /** + * Optional. Default values to use if no value is selected/provided. + * + * Generated from protobuf field repeated string default_values = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $default_values; + /** + * Optional. Whether to skip the configured prefix and suffix when using + * default values. If true, default values are inserted raw (joined by the + * separator). + * + * Generated from protobuf field bool skip_default_affixes = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip_default_affixes = false; + /** + * Required. Source of the values for the filter. + * + * Generated from protobuf field .google.cloud.chronicle.v1.AdvancedFilterConfig.ValueSource value_source = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $value_source = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $token + * Required. The token name to look for in the query (e.g., "hostname"). + * The system will automatically wrap this in '$' (e.g., "$hostname$"). + * @type string $prefix + * Optional. String to prepend to the final replaced value (e.g., "/", "^(", + * "\""). + * @type string $suffix + * Optional. String to append to the final replaced value (e.g., "/", ")$", + * "\""). + * @type string $separator + * Optional. Delimiter to join multiple selected values (e.g., "|", " OR field + * = "). + * @type bool $multiple_allowed + * Optional. Whether to allow selection of multiple values. + * @type string[] $default_values + * Optional. Default values to use if no value is selected/provided. + * @type bool $skip_default_affixes + * Optional. Whether to skip the configured prefix and suffix when using + * default values. If true, default values are inserted raw (joined by the + * separator). + * @type \Google\Cloud\Chronicle\V1\AdvancedFilterConfig\ValueSource $value_source + * Required. Source of the values for the filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * Required. The token name to look for in the query (e.g., "hostname"). + * The system will automatically wrap this in '$' (e.g., "$hostname$"). + * + * Generated from protobuf field string token = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getToken() + { + return $this->token; + } + + /** + * Required. The token name to look for in the query (e.g., "hostname"). + * The system will automatically wrap this in '$' (e.g., "$hostname$"). + * + * Generated from protobuf field string token = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setToken($var) + { + GPBUtil::checkString($var, True); + $this->token = $var; + + return $this; + } + + /** + * Optional. String to prepend to the final replaced value (e.g., "/", "^(", + * "\""). + * + * Generated from protobuf field string prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrefix() + { + return $this->prefix; + } + + /** + * Optional. String to prepend to the final replaced value (e.g., "/", "^(", + * "\""). + * + * Generated from protobuf field string prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrefix($var) + { + GPBUtil::checkString($var, True); + $this->prefix = $var; + + return $this; + } + + /** + * Optional. String to append to the final replaced value (e.g., "/", ")$", + * "\""). + * + * Generated from protobuf field string suffix = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSuffix() + { + return $this->suffix; + } + + /** + * Optional. String to append to the final replaced value (e.g., "/", ")$", + * "\""). + * + * Generated from protobuf field string suffix = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSuffix($var) + { + GPBUtil::checkString($var, True); + $this->suffix = $var; + + return $this; + } + + /** + * Optional. Delimiter to join multiple selected values (e.g., "|", " OR field + * = "). + * + * Generated from protobuf field string separator = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSeparator() + { + return $this->separator; + } + + /** + * Optional. Delimiter to join multiple selected values (e.g., "|", " OR field + * = "). + * + * Generated from protobuf field string separator = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSeparator($var) + { + GPBUtil::checkString($var, True); + $this->separator = $var; + + return $this; + } + + /** + * Optional. Whether to allow selection of multiple values. + * + * Generated from protobuf field bool multiple_allowed = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getMultipleAllowed() + { + return $this->multiple_allowed; + } + + /** + * Optional. Whether to allow selection of multiple values. + * + * Generated from protobuf field bool multiple_allowed = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setMultipleAllowed($var) + { + GPBUtil::checkBool($var); + $this->multiple_allowed = $var; + + return $this; + } + + /** + * Optional. Default values to use if no value is selected/provided. + * + * Generated from protobuf field repeated string default_values = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getDefaultValues() + { + return $this->default_values; + } + + /** + * Optional. Default values to use if no value is selected/provided. + * + * Generated from protobuf field repeated string default_values = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setDefaultValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->default_values = $arr; + + return $this; + } + + /** + * Optional. Whether to skip the configured prefix and suffix when using + * default values. If true, default values are inserted raw (joined by the + * separator). + * + * Generated from protobuf field bool skip_default_affixes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSkipDefaultAffixes() + { + return $this->skip_default_affixes; + } + + /** + * Optional. Whether to skip the configured prefix and suffix when using + * default values. If true, default values are inserted raw (joined by the + * separator). + * + * Generated from protobuf field bool skip_default_affixes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSkipDefaultAffixes($var) + { + GPBUtil::checkBool($var); + $this->skip_default_affixes = $var; + + return $this; + } + + /** + * Required. Source of the values for the filter. + * + * Generated from protobuf field .google.cloud.chronicle.v1.AdvancedFilterConfig.ValueSource value_source = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\AdvancedFilterConfig\ValueSource|null + */ + public function getValueSource() + { + return $this->value_source; + } + + public function hasValueSource() + { + return isset($this->value_source); + } + + public function clearValueSource() + { + unset($this->value_source); + } + + /** + * Required. Source of the values for the filter. + * + * Generated from protobuf field .google.cloud.chronicle.v1.AdvancedFilterConfig.ValueSource value_source = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\AdvancedFilterConfig\ValueSource $var + * @return $this + */ + public function setValueSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\AdvancedFilterConfig\ValueSource::class); + $this->value_source = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/AdvancedFilterConfig/ManualOptions.php b/Chronicle/src/V1/AdvancedFilterConfig/ManualOptions.php new file mode 100644 index 00000000000..9bae191bc72 --- /dev/null +++ b/Chronicle/src/V1/AdvancedFilterConfig/ManualOptions.php @@ -0,0 +1,71 @@ +google.cloud.chronicle.v1.AdvancedFilterConfig.ManualOptions + */ +class ManualOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The options provided by the user. + * The max number of options is limited to 10000. + * + * Generated from protobuf field repeated string options = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $options; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $options + * Optional. The options provided by the user. + * The max number of options is limited to 10000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The options provided by the user. + * The max number of options is limited to 10000. + * + * Generated from protobuf field repeated string options = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getOptions() + { + return $this->options; + } + + /** + * Optional. The options provided by the user. + * The max number of options is limited to 10000. + * + * Generated from protobuf field repeated string options = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setOptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->options = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/AdvancedFilterConfig/QueryOptions.php b/Chronicle/src/V1/AdvancedFilterConfig/QueryOptions.php new file mode 100644 index 00000000000..fdc4d1b5c93 --- /dev/null +++ b/Chronicle/src/V1/AdvancedFilterConfig/QueryOptions.php @@ -0,0 +1,184 @@ +google.cloud.chronicle.v1.AdvancedFilterConfig.QueryOptions + */ +class QueryOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The query to execute to fetch the values. + * + * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = ''; + /** + * Required. The column name to use for the values. + * + * Generated from protobuf field string column = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $column = ''; + /** + * Optional. Enable global time filter + * + * Generated from protobuf field bool global_time_filter_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $global_time_filter_enabled = false; + /** + * Optional. Time range input specifically for the filter's population + * query. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardQuery.Input input = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $input = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query + * Required. The query to execute to fetch the values. + * @type string $column + * Required. The column name to use for the values. + * @type bool $global_time_filter_enabled + * Optional. Enable global time filter + * @type \Google\Cloud\Chronicle\V1\DashboardQuery\Input $input + * Optional. Time range input specifically for the filter's population + * query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * Required. The query to execute to fetch the values. + * + * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Required. The query to execute to fetch the values. + * + * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * Required. The column name to use for the values. + * + * Generated from protobuf field string column = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getColumn() + { + return $this->column; + } + + /** + * Required. The column name to use for the values. + * + * Generated from protobuf field string column = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setColumn($var) + { + GPBUtil::checkString($var, True); + $this->column = $var; + + return $this; + } + + /** + * Optional. Enable global time filter + * + * Generated from protobuf field bool global_time_filter_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getGlobalTimeFilterEnabled() + { + return $this->global_time_filter_enabled; + } + + /** + * Optional. Enable global time filter + * + * Generated from protobuf field bool global_time_filter_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setGlobalTimeFilterEnabled($var) + { + GPBUtil::checkBool($var); + $this->global_time_filter_enabled = $var; + + return $this; + } + + /** + * Optional. Time range input specifically for the filter's population + * query. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardQuery.Input input = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardQuery\Input|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Optional. Time range input specifically for the filter's population + * query. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardQuery.Input input = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardQuery\Input $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardQuery\Input::class); + $this->input = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/AdvancedFilterConfig/ValueSource.php b/Chronicle/src/V1/AdvancedFilterConfig/ValueSource.php new file mode 100644 index 00000000000..3ceaa6be54f --- /dev/null +++ b/Chronicle/src/V1/AdvancedFilterConfig/ValueSource.php @@ -0,0 +1,111 @@ +google.cloud.chronicle.v1.AdvancedFilterConfig.ValueSource + */ +class ValueSource extends \Google\Protobuf\Internal\Message +{ + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\AdvancedFilterConfig\ManualOptions $manual_options + * Optional. Manual options provided by the user. + * @type \Google\Cloud\Chronicle\V1\AdvancedFilterConfig\QueryOptions $query_options + * Optional. Query options to fetch the values from the query engine. + * This is used for the filter's population query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Manual options provided by the user. + * + * Generated from protobuf field .google.cloud.chronicle.v1.AdvancedFilterConfig.ManualOptions manual_options = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\AdvancedFilterConfig\ManualOptions|null + */ + public function getManualOptions() + { + return $this->readOneof(1); + } + + public function hasManualOptions() + { + return $this->hasOneof(1); + } + + /** + * Optional. Manual options provided by the user. + * + * Generated from protobuf field .google.cloud.chronicle.v1.AdvancedFilterConfig.ManualOptions manual_options = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\AdvancedFilterConfig\ManualOptions $var + * @return $this + */ + public function setManualOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\AdvancedFilterConfig\ManualOptions::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Optional. Query options to fetch the values from the query engine. + * This is used for the filter's population query. + * + * Generated from protobuf field .google.cloud.chronicle.v1.AdvancedFilterConfig.QueryOptions query_options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\AdvancedFilterConfig\QueryOptions|null + */ + public function getQueryOptions() + { + return $this->readOneof(2); + } + + public function hasQueryOptions() + { + return $this->hasOneof(2); + } + + /** + * Optional. Query options to fetch the values from the query engine. + * This is used for the filter's population query. + * + * Generated from protobuf field .google.cloud.chronicle.v1.AdvancedFilterConfig.QueryOptions query_options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\AdvancedFilterConfig\QueryOptions $var + * @return $this + */ + public function setQueryOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\AdvancedFilterConfig\QueryOptions::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/Chronicle/src/V1/AxisType.php b/Chronicle/src/V1/AxisType.php new file mode 100644 index 00000000000..13139996bbf --- /dev/null +++ b/Chronicle/src/V1/AxisType.php @@ -0,0 +1,63 @@ +google.cloud.chronicle.v1.AxisType + */ +class AxisType +{ + /** + * Generated from protobuf enum AXIS_TYPE_UNSPECIFIED = 0; + */ + const AXIS_TYPE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum VALUE = 1; + */ + const VALUE = 1; + /** + * Generated from protobuf enum CATEGORY = 2; + */ + const CATEGORY = 2; + /** + * Generated from protobuf enum TIME = 3; + */ + const TIME = 3; + /** + * Generated from protobuf enum LOG = 4; + */ + const LOG = 4; + + private static $valueToName = [ + self::AXIS_TYPE_UNSPECIFIED => 'AXIS_TYPE_UNSPECIFIED', + self::VALUE => 'VALUE', + self::CATEGORY => 'CATEGORY', + self::TIME => 'TIME', + self::LOG => 'LOG', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/BatchGetDashboardChartsRequest.php b/Chronicle/src/V1/BatchGetDashboardChartsRequest.php new file mode 100644 index 00000000000..30510080cba --- /dev/null +++ b/Chronicle/src/V1/BatchGetDashboardChartsRequest.php @@ -0,0 +1,138 @@ +google.cloud.chronicle.v1.BatchGetDashboardChartsRequest + */ +class BatchGetDashboardChartsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource shared by all dashboard charts being + * retrieved. Format: + * projects/{project}/locations/{location}/instances/{instance} If this is + * set, the parent of all of the dashboard charts specified in `names` must + * match this field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The names of the dashboard charts to get. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $names; + + /** + * @param string $parent Required. The parent resource shared by all dashboard charts being + * retrieved. Format: + * projects/{project}/locations/{location}/instances/{instance} If this is + * set, the parent of all of the dashboard charts specified in `names` must + * match this field. Please see + * {@see DashboardChartServiceClient::instanceName()} for help formatting this field. + * @param string[] $names Required. The names of the dashboard charts to get. Please see + * {@see DashboardChartServiceClient::dashboardChartName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\BatchGetDashboardChartsRequest + * + * @experimental + */ + public static function build(string $parent, array $names): self + { + return (new self()) + ->setParent($parent) + ->setNames($names); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource shared by all dashboard charts being + * retrieved. Format: + * projects/{project}/locations/{location}/instances/{instance} If this is + * set, the parent of all of the dashboard charts specified in `names` must + * match this field. + * @type string[] $names + * Required. The names of the dashboard charts to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource shared by all dashboard charts being + * retrieved. Format: + * projects/{project}/locations/{location}/instances/{instance} If this is + * set, the parent of all of the dashboard charts specified in `names` must + * match this field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource shared by all dashboard charts being + * retrieved. Format: + * projects/{project}/locations/{location}/instances/{instance} If this is + * set, the parent of all of the dashboard charts specified in `names` must + * match this field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The names of the dashboard charts to get. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The names of the dashboard charts to get. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/BatchGetDashboardChartsResponse.php b/Chronicle/src/V1/BatchGetDashboardChartsResponse.php new file mode 100644 index 00000000000..3b02a82be8a --- /dev/null +++ b/Chronicle/src/V1/BatchGetDashboardChartsResponse.php @@ -0,0 +1,67 @@ +google.cloud.chronicle.v1.BatchGetDashboardChartsResponse + */ +class BatchGetDashboardChartsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The dashboardCharts from the specified chronicle instance. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart dashboard_charts = 1; + */ + private $dashboard_charts; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\DashboardChart[] $dashboard_charts + * The dashboardCharts from the specified chronicle instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * The dashboardCharts from the specified chronicle instance. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart dashboard_charts = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DashboardChart> + */ + public function getDashboardCharts() + { + return $this->dashboard_charts; + } + + /** + * The dashboardCharts from the specified chronicle instance. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart dashboard_charts = 1; + * @param \Google\Cloud\Chronicle\V1\DashboardChart[] $var + * @return $this + */ + public function setDashboardCharts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DashboardChart::class); + $this->dashboard_charts = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/BigQueryExport.php b/Chronicle/src/V1/BigQueryExport.php new file mode 100644 index 00000000000..0b7137d679d --- /dev/null +++ b/Chronicle/src/V1/BigQueryExport.php @@ -0,0 +1,369 @@ +google.cloud.chronicle.v1.BigQueryExport + */ +class BigQueryExport extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the BigQueryExport. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/bigQueryExport + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Whether the BigQueryExport has been provisioned for the + * Chronicle instance. + * + * Generated from protobuf field bool provisioned = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $provisioned = false; + /** + * Output only. The BigQueryExportPackage entitled for the Chronicle instance. + * + * Generated from protobuf field .google.cloud.chronicle.v1.BigQueryExportPackage big_query_export_package = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $big_query_export_package = 0; + /** + * Optional. The export settings for the Entity Graph data source. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSourceExportSettings entity_graph_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $entity_graph_settings = null; + /** + * Optional. The export settings for the IOC Matches data source. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSourceExportSettings ioc_matches_settings = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ioc_matches_settings = null; + /** + * Optional. The export settings for the Rule Detections data source. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSourceExportSettings rule_detections_settings = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $rule_detections_settings = null; + /** + * Optional. The export settings for the UDM Events Aggregates data source. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSourceExportSettings udm_events_aggregates_settings = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $udm_events_aggregates_settings = null; + /** + * Optional. The export settings for the UDM Events data source. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSourceExportSettings udm_events_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $udm_events_settings = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the BigQueryExport. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/bigQueryExport + * @type bool $provisioned + * Output only. Whether the BigQueryExport has been provisioned for the + * Chronicle instance. + * @type int $big_query_export_package + * Output only. The BigQueryExportPackage entitled for the Chronicle instance. + * @type \Google\Cloud\Chronicle\V1\DataSourceExportSettings $entity_graph_settings + * Optional. The export settings for the Entity Graph data source. + * @type \Google\Cloud\Chronicle\V1\DataSourceExportSettings $ioc_matches_settings + * Optional. The export settings for the IOC Matches data source. + * @type \Google\Cloud\Chronicle\V1\DataSourceExportSettings $rule_detections_settings + * Optional. The export settings for the Rule Detections data source. + * @type \Google\Cloud\Chronicle\V1\DataSourceExportSettings $udm_events_aggregates_settings + * Optional. The export settings for the UDM Events Aggregates data source. + * @type \Google\Cloud\Chronicle\V1\DataSourceExportSettings $udm_events_settings + * Optional. The export settings for the UDM Events data source. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\BigQueryExport::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the BigQueryExport. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/bigQueryExport + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the BigQueryExport. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/bigQueryExport + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Whether the BigQueryExport has been provisioned for the + * Chronicle instance. + * + * Generated from protobuf field bool provisioned = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getProvisioned() + { + return $this->provisioned; + } + + /** + * Output only. Whether the BigQueryExport has been provisioned for the + * Chronicle instance. + * + * Generated from protobuf field bool provisioned = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setProvisioned($var) + { + GPBUtil::checkBool($var); + $this->provisioned = $var; + + return $this; + } + + /** + * Output only. The BigQueryExportPackage entitled for the Chronicle instance. + * + * Generated from protobuf field .google.cloud.chronicle.v1.BigQueryExportPackage big_query_export_package = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getBigQueryExportPackage() + { + return $this->big_query_export_package; + } + + /** + * Output only. The BigQueryExportPackage entitled for the Chronicle instance. + * + * Generated from protobuf field .google.cloud.chronicle.v1.BigQueryExportPackage big_query_export_package = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setBigQueryExportPackage($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\BigQueryExportPackage::class); + $this->big_query_export_package = $var; + + return $this; + } + + /** + * Optional. The export settings for the Entity Graph data source. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSourceExportSettings entity_graph_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DataSourceExportSettings|null + */ + public function getEntityGraphSettings() + { + return $this->entity_graph_settings; + } + + public function hasEntityGraphSettings() + { + return isset($this->entity_graph_settings); + } + + public function clearEntityGraphSettings() + { + unset($this->entity_graph_settings); + } + + /** + * Optional. The export settings for the Entity Graph data source. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSourceExportSettings entity_graph_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DataSourceExportSettings $var + * @return $this + */ + public function setEntityGraphSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DataSourceExportSettings::class); + $this->entity_graph_settings = $var; + + return $this; + } + + /** + * Optional. The export settings for the IOC Matches data source. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSourceExportSettings ioc_matches_settings = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DataSourceExportSettings|null + */ + public function getIocMatchesSettings() + { + return $this->ioc_matches_settings; + } + + public function hasIocMatchesSettings() + { + return isset($this->ioc_matches_settings); + } + + public function clearIocMatchesSettings() + { + unset($this->ioc_matches_settings); + } + + /** + * Optional. The export settings for the IOC Matches data source. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSourceExportSettings ioc_matches_settings = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DataSourceExportSettings $var + * @return $this + */ + public function setIocMatchesSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DataSourceExportSettings::class); + $this->ioc_matches_settings = $var; + + return $this; + } + + /** + * Optional. The export settings for the Rule Detections data source. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSourceExportSettings rule_detections_settings = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DataSourceExportSettings|null + */ + public function getRuleDetectionsSettings() + { + return $this->rule_detections_settings; + } + + public function hasRuleDetectionsSettings() + { + return isset($this->rule_detections_settings); + } + + public function clearRuleDetectionsSettings() + { + unset($this->rule_detections_settings); + } + + /** + * Optional. The export settings for the Rule Detections data source. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSourceExportSettings rule_detections_settings = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DataSourceExportSettings $var + * @return $this + */ + public function setRuleDetectionsSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DataSourceExportSettings::class); + $this->rule_detections_settings = $var; + + return $this; + } + + /** + * Optional. The export settings for the UDM Events Aggregates data source. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSourceExportSettings udm_events_aggregates_settings = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DataSourceExportSettings|null + */ + public function getUdmEventsAggregatesSettings() + { + return $this->udm_events_aggregates_settings; + } + + public function hasUdmEventsAggregatesSettings() + { + return isset($this->udm_events_aggregates_settings); + } + + public function clearUdmEventsAggregatesSettings() + { + unset($this->udm_events_aggregates_settings); + } + + /** + * Optional. The export settings for the UDM Events Aggregates data source. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSourceExportSettings udm_events_aggregates_settings = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DataSourceExportSettings $var + * @return $this + */ + public function setUdmEventsAggregatesSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DataSourceExportSettings::class); + $this->udm_events_aggregates_settings = $var; + + return $this; + } + + /** + * Optional. The export settings for the UDM Events data source. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSourceExportSettings udm_events_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DataSourceExportSettings|null + */ + public function getUdmEventsSettings() + { + return $this->udm_events_settings; + } + + public function hasUdmEventsSettings() + { + return isset($this->udm_events_settings); + } + + public function clearUdmEventsSettings() + { + unset($this->udm_events_settings); + } + + /** + * Optional. The export settings for the UDM Events data source. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSourceExportSettings udm_events_settings = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DataSourceExportSettings $var + * @return $this + */ + public function setUdmEventsSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DataSourceExportSettings::class); + $this->udm_events_settings = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/BigQueryExportPackage.php b/Chronicle/src/V1/BigQueryExportPackage.php new file mode 100644 index 00000000000..8c9603a4b6a --- /dev/null +++ b/Chronicle/src/V1/BigQueryExportPackage.php @@ -0,0 +1,61 @@ +google.cloud.chronicle.v1.BigQueryExportPackage + */ +class BigQueryExportPackage +{ + /** + * The BigQueryExportPackage is unspecified. + * + * Generated from protobuf enum BIG_QUERY_EXPORT_PACKAGE_UNSPECIFIED = 0; + */ + const BIG_QUERY_EXPORT_PACKAGE_UNSPECIFIED = 0; + /** + * The BigQueryExportPackage is Bring Your Own BigQuery. + * + * Generated from protobuf enum BIG_QUERY_EXPORT_PACKAGE_BYOBQ = 1; + */ + const BIG_QUERY_EXPORT_PACKAGE_BYOBQ = 1; + /** + * The BigQueryExportPackage is Advanced BigQuery. + * + * Generated from protobuf enum BIG_QUERY_EXPORT_PACKAGE_ADVANCED = 2; + */ + const BIG_QUERY_EXPORT_PACKAGE_ADVANCED = 2; + + private static $valueToName = [ + self::BIG_QUERY_EXPORT_PACKAGE_UNSPECIFIED => 'BIG_QUERY_EXPORT_PACKAGE_UNSPECIFIED', + self::BIG_QUERY_EXPORT_PACKAGE_BYOBQ => 'BIG_QUERY_EXPORT_PACKAGE_BYOBQ', + self::BIG_QUERY_EXPORT_PACKAGE_ADVANCED => 'BIG_QUERY_EXPORT_PACKAGE_ADVANCED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/Button.php b/Chronicle/src/V1/Button.php new file mode 100644 index 00000000000..da3b6845d4f --- /dev/null +++ b/Chronicle/src/V1/Button.php @@ -0,0 +1,185 @@ +google.cloud.chronicle.v1.Button + */ +class Button extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string label = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $label = ''; + /** + * Generated from protobuf field string hyperlink = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hyperlink = ''; + /** + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Whether to open the link in a new tab. + * + * Generated from protobuf field bool new_tab = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $new_tab = false; + /** + * Generated from protobuf field .google.cloud.chronicle.v1.Button.Properties properties = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $properties = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $label + * @type string $hyperlink + * @type string $description + * @type bool $new_tab + * Optional. Whether to open the link in a new tab. + * @type \Google\Cloud\Chronicle\V1\Button\Properties $properties + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string label = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Generated from protobuf field string label = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * Generated from protobuf field string hyperlink = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHyperlink() + { + return $this->hyperlink; + } + + /** + * Generated from protobuf field string hyperlink = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHyperlink($var) + { + GPBUtil::checkString($var, True); + $this->hyperlink = $var; + + return $this; + } + + /** + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Whether to open the link in a new tab. + * + * Generated from protobuf field bool new_tab = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getNewTab() + { + return $this->new_tab; + } + + /** + * Optional. Whether to open the link in a new tab. + * + * Generated from protobuf field bool new_tab = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setNewTab($var) + { + GPBUtil::checkBool($var); + $this->new_tab = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.Button.Properties properties = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\Button\Properties|null + */ + public function getProperties() + { + return $this->properties; + } + + public function hasProperties() + { + return isset($this->properties); + } + + public function clearProperties() + { + unset($this->properties); + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.Button.Properties properties = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\Button\Properties $var + * @return $this + */ + public function setProperties($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Button\Properties::class); + $this->properties = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/Button/Properties.php b/Chronicle/src/V1/Button/Properties.php new file mode 100644 index 00000000000..63e61ffaaca --- /dev/null +++ b/Chronicle/src/V1/Button/Properties.php @@ -0,0 +1,85 @@ +google.cloud.chronicle.v1.Button.Properties + */ +class Properties extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string color = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $color = ''; + /** + * Generated from protobuf field .google.cloud.chronicle.v1.ButtonStyle button_style = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $button_style = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $color + * @type int $button_style + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string color = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getColor() + { + return $this->color; + } + + /** + * Generated from protobuf field string color = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setColor($var) + { + GPBUtil::checkString($var, True); + $this->color = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.ButtonStyle button_style = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getButtonStyle() + { + return $this->button_style; + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.ButtonStyle button_style = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setButtonStyle($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\ButtonStyle::class); + $this->button_style = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/ButtonStyle.php b/Chronicle/src/V1/ButtonStyle.php new file mode 100644 index 00000000000..2380d2624d4 --- /dev/null +++ b/Chronicle/src/V1/ButtonStyle.php @@ -0,0 +1,58 @@ +google.cloud.chronicle.v1.ButtonStyle + */ +class ButtonStyle +{ + /** + * Generated from protobuf enum BUTTON_STYLE_UNSPECIFIED = 0; + */ + const BUTTON_STYLE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum BUTTON_STYLE_FILLED = 1; + */ + const BUTTON_STYLE_FILLED = 1; + /** + * Generated from protobuf enum BUTTON_STYLE_OUTLINED = 2; + */ + const BUTTON_STYLE_OUTLINED = 2; + /** + * Generated from protobuf enum BUTTON_STYLE_TRANSPARENT = 3; + */ + const BUTTON_STYLE_TRANSPARENT = 3; + + private static $valueToName = [ + self::BUTTON_STYLE_UNSPECIFIED => 'BUTTON_STYLE_UNSPECIFIED', + self::BUTTON_STYLE_FILLED => 'BUTTON_STYLE_FILLED', + self::BUTTON_STYLE_OUTLINED => 'BUTTON_STYLE_OUTLINED', + self::BUTTON_STYLE_TRANSPARENT => 'BUTTON_STYLE_TRANSPARENT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/Client/BigQueryExportServiceClient.php b/Chronicle/src/V1/Client/BigQueryExportServiceClient.php new file mode 100644 index 00000000000..1eb02b4a2bc --- /dev/null +++ b/Chronicle/src/V1/Client/BigQueryExportServiceClient.php @@ -0,0 +1,340 @@ + getBigQueryExportAsync(GetBigQueryExportRequest $request, array $optionalArgs = []) + * @method PromiseInterface provisionBigQueryExportAsync(ProvisionBigQueryExportRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBigQueryExportAsync(UpdateBigQueryExportRequest $request, array $optionalArgs = []) + */ +final class BigQueryExportServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.chronicle.v1.BigQueryExportService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'chronicle.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'chronicle.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/chronicle', + 'https://www.googleapis.com/auth/chronicle.readonly', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/big_query_export_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/big_query_export_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/big_query_export_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/big_query_export_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * big_query_export resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted big_query_export resource. + */ + public static function bigQueryExportName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('bigQueryExport')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - bigQueryExport: projects/{project}/locations/{location}/instances/{instance}/bigQueryExport + * - instance: projects/{project}/locations/{location}/instances/{instance} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'chronicle.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Chronicle\V1\BigQueryExportServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new BigQueryExportServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Get the BigQuery export configuration for a Chronicle instance. + * + * The async variant is + * {@see BigQueryExportServiceClient::getBigQueryExportAsync()} . + * + * @example samples/V1/BigQueryExportServiceClient/get_big_query_export.php + * + * @param GetBigQueryExportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BigQueryExport + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBigQueryExport(GetBigQueryExportRequest $request, array $callOptions = []): BigQueryExport + { + return $this->startApiCall('GetBigQueryExport', $request, $callOptions)->wait(); + } + + /** + * Provision the BigQuery export for a Chronicle instance. This will create + * {{gcp_name}} resources like {{storage_name}} buckets, BigQuery datasets + * and set default export settings for each data source. + * + * The async variant is + * {@see BigQueryExportServiceClient::provisionBigQueryExportAsync()} . + * + * @example samples/V1/BigQueryExportServiceClient/provision_big_query_export.php + * + * @param ProvisionBigQueryExportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BigQueryExport + * + * @throws ApiException Thrown if the API call fails. + */ + public function provisionBigQueryExport( + ProvisionBigQueryExportRequest $request, + array $callOptions = [] + ): BigQueryExport { + return $this->startApiCall('ProvisionBigQueryExport', $request, $callOptions)->wait(); + } + + /** + * Update the BigQuery export configuration for a Chronicle instance. + * + * The async variant is + * {@see BigQueryExportServiceClient::updateBigQueryExportAsync()} . + * + * @example samples/V1/BigQueryExportServiceClient/update_big_query_export.php + * + * @param UpdateBigQueryExportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BigQueryExport + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateBigQueryExport(UpdateBigQueryExportRequest $request, array $callOptions = []): BigQueryExport + { + return $this->startApiCall('UpdateBigQueryExport', $request, $callOptions)->wait(); + } +} diff --git a/Chronicle/src/V1/Client/DashboardChartServiceClient.php b/Chronicle/src/V1/Client/DashboardChartServiceClient.php new file mode 100644 index 00000000000..38eb3b80463 --- /dev/null +++ b/Chronicle/src/V1/Client/DashboardChartServiceClient.php @@ -0,0 +1,316 @@ + batchGetDashboardChartsAsync(BatchGetDashboardChartsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDashboardChartAsync(GetDashboardChartRequest $request, array $optionalArgs = []) + */ +final class DashboardChartServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.chronicle.v1.DashboardChartService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'chronicle.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'chronicle.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/chronicle', + 'https://www.googleapis.com/auth/chronicle.readonly', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/dashboard_chart_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/dashboard_chart_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/dashboard_chart_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/dashboard_chart_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * dashboard_chart resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $chart + * + * @return string The formatted dashboard_chart resource. + */ + public static function dashboardChartName( + string $project, + string $location, + string $instance, + string $chart + ): string { + return self::getPathTemplate('dashboardChart')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'chart' => $chart, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - dashboardChart: projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart} + * - instance: projects/{project}/locations/{location}/instances/{instance} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'chronicle.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Chronicle\V1\DashboardChartServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new DashboardChartServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Get dashboard charts in batches. + * + * The async variant is + * {@see DashboardChartServiceClient::batchGetDashboardChartsAsync()} . + * + * @example samples/V1/DashboardChartServiceClient/batch_get_dashboard_charts.php + * + * @param BatchGetDashboardChartsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchGetDashboardChartsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchGetDashboardCharts( + BatchGetDashboardChartsRequest $request, + array $callOptions = [] + ): BatchGetDashboardChartsResponse { + return $this->startApiCall('BatchGetDashboardCharts', $request, $callOptions)->wait(); + } + + /** + * Get a dashboard chart. + * + * The async variant is + * {@see DashboardChartServiceClient::getDashboardChartAsync()} . + * + * @example samples/V1/DashboardChartServiceClient/get_dashboard_chart.php + * + * @param GetDashboardChartRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DashboardChart + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDashboardChart(GetDashboardChartRequest $request, array $callOptions = []): DashboardChart + { + return $this->startApiCall('GetDashboardChart', $request, $callOptions)->wait(); + } +} diff --git a/Chronicle/src/V1/Client/DashboardQueryServiceClient.php b/Chronicle/src/V1/Client/DashboardQueryServiceClient.php new file mode 100644 index 00000000000..730b7aa7f1e --- /dev/null +++ b/Chronicle/src/V1/Client/DashboardQueryServiceClient.php @@ -0,0 +1,342 @@ + executeDashboardQueryAsync(ExecuteDashboardQueryRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDashboardQueryAsync(GetDashboardQueryRequest $request, array $optionalArgs = []) + */ +final class DashboardQueryServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.chronicle.v1.DashboardQueryService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'chronicle.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'chronicle.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/chronicle', + 'https://www.googleapis.com/auth/chronicle.readonly', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/dashboard_query_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/dashboard_query_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/dashboard_query_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/dashboard_query_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * dashboard_chart resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $chart + * + * @return string The formatted dashboard_chart resource. + */ + public static function dashboardChartName( + string $project, + string $location, + string $instance, + string $chart + ): string { + return self::getPathTemplate('dashboardChart')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'chart' => $chart, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * dashboard_query resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $query + * + * @return string The formatted dashboard_query resource. + */ + public static function dashboardQueryName( + string $project, + string $location, + string $instance, + string $query + ): string { + return self::getPathTemplate('dashboardQuery')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'query' => $query, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - dashboardChart: projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart} + * - dashboardQuery: projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query} + * - instance: projects/{project}/locations/{location}/instances/{instance} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'chronicle.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Chronicle\V1\DashboardQueryServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new DashboardQueryServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Execute a query and return the data. + * + * The async variant is + * {@see DashboardQueryServiceClient::executeDashboardQueryAsync()} . + * + * @example samples/V1/DashboardQueryServiceClient/execute_dashboard_query.php + * + * @param ExecuteDashboardQueryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ExecuteDashboardQueryResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function executeDashboardQuery( + ExecuteDashboardQueryRequest $request, + array $callOptions = [] + ): ExecuteDashboardQueryResponse { + return $this->startApiCall('ExecuteDashboardQuery', $request, $callOptions)->wait(); + } + + /** + * Get a dashboard query. + * + * The async variant is + * {@see DashboardQueryServiceClient::getDashboardQueryAsync()} . + * + * @example samples/V1/DashboardQueryServiceClient/get_dashboard_query.php + * + * @param GetDashboardQueryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DashboardQuery + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDashboardQuery(GetDashboardQueryRequest $request, array $callOptions = []): DashboardQuery + { + return $this->startApiCall('GetDashboardQuery', $request, $callOptions)->wait(); + } +} diff --git a/Chronicle/src/V1/Client/FeaturedContentNativeDashboardServiceClient.php b/Chronicle/src/V1/Client/FeaturedContentNativeDashboardServiceClient.php new file mode 100644 index 00000000000..ae6ea8d0f02 --- /dev/null +++ b/Chronicle/src/V1/Client/FeaturedContentNativeDashboardServiceClient.php @@ -0,0 +1,455 @@ + getFeaturedContentNativeDashboardAsync(GetFeaturedContentNativeDashboardRequest $request, array $optionalArgs = []) + * @method PromiseInterface installFeaturedContentNativeDashboardAsync(InstallFeaturedContentNativeDashboardRequest $request, array $optionalArgs = []) + * @method PromiseInterface listFeaturedContentNativeDashboardsAsync(ListFeaturedContentNativeDashboardsRequest $request, array $optionalArgs = []) + */ +final class FeaturedContentNativeDashboardServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.chronicle.v1.FeaturedContentNativeDashboardService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'chronicle.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'chronicle.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/chronicle', + 'https://www.googleapis.com/auth/chronicle.readonly', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/featured_content_native_dashboard_service_client_config.json', + 'descriptorsConfigPath' => + __DIR__ . '/../resources/featured_content_native_dashboard_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/featured_content_native_dashboard_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . '/../resources/featured_content_native_dashboard_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a content_hub + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted content_hub resource. + */ + public static function contentHubName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('contentHub')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * dashboard_chart resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $chart + * + * @return string The formatted dashboard_chart resource. + */ + public static function dashboardChartName( + string $project, + string $location, + string $instance, + string $chart + ): string { + return self::getPathTemplate('dashboardChart')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'chart' => $chart, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * dashboard_query resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $query + * + * @return string The formatted dashboard_query resource. + */ + public static function dashboardQueryName( + string $project, + string $location, + string $instance, + string $query + ): string { + return self::getPathTemplate('dashboardQuery')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'query' => $query, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * featured_content_native_dashboard resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $featuredContentNativeDashboard + * + * @return string The formatted featured_content_native_dashboard resource. + */ + public static function featuredContentNativeDashboardName( + string $project, + string $location, + string $instance, + string $featuredContentNativeDashboard + ): string { + return self::getPathTemplate('featuredContentNativeDashboard')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'featured_content_native_dashboard' => $featuredContentNativeDashboard, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * native_dashboard resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $dashboard + * + * @return string The formatted native_dashboard resource. + */ + public static function nativeDashboardName( + string $project, + string $location, + string $instance, + string $dashboard + ): string { + return self::getPathTemplate('nativeDashboard')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'dashboard' => $dashboard, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - contentHub: projects/{project}/locations/{location}/instances/{instance}/contentHub + * - dashboardChart: projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart} + * - dashboardQuery: projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query} + * - featuredContentNativeDashboard: projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard} + * - instance: projects/{project}/locations/{location}/instances/{instance} + * - nativeDashboard: projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'chronicle.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Chronicle\V1\FeaturedContentNativeDashboardServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new FeaturedContentNativeDashboardServiceClient(['credentials' => + * $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Get a native dashboard featured content. + * + * The async variant is + * {@see FeaturedContentNativeDashboardServiceClient::getFeaturedContentNativeDashboardAsync()} + * . + * + * @example samples/V1/FeaturedContentNativeDashboardServiceClient/get_featured_content_native_dashboard.php + * + * @param GetFeaturedContentNativeDashboardRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return FeaturedContentNativeDashboard + * + * @throws ApiException Thrown if the API call fails. + */ + public function getFeaturedContentNativeDashboard( + GetFeaturedContentNativeDashboardRequest $request, + array $callOptions = [] + ): FeaturedContentNativeDashboard { + return $this->startApiCall('GetFeaturedContentNativeDashboard', $request, $callOptions)->wait(); + } + + /** + * Install a native dashboard featured content. + * + * The async variant is + * {@see FeaturedContentNativeDashboardServiceClient::installFeaturedContentNativeDashboardAsync()} + * . + * + * @example samples/V1/FeaturedContentNativeDashboardServiceClient/install_featured_content_native_dashboard.php + * + * @param InstallFeaturedContentNativeDashboardRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return InstallFeaturedContentNativeDashboardResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function installFeaturedContentNativeDashboard( + InstallFeaturedContentNativeDashboardRequest $request, + array $callOptions = [] + ): InstallFeaturedContentNativeDashboardResponse { + return $this->startApiCall('InstallFeaturedContentNativeDashboard', $request, $callOptions)->wait(); + } + + /** + * List all native dashboards featured content. + * + * The async variant is + * {@see FeaturedContentNativeDashboardServiceClient::listFeaturedContentNativeDashboardsAsync()} + * . + * + * @example samples/V1/FeaturedContentNativeDashboardServiceClient/list_featured_content_native_dashboards.php + * + * @param ListFeaturedContentNativeDashboardsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listFeaturedContentNativeDashboards( + ListFeaturedContentNativeDashboardsRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListFeaturedContentNativeDashboards', $request, $callOptions); + } +} diff --git a/Chronicle/src/V1/Client/NativeDashboardServiceClient.php b/Chronicle/src/V1/Client/NativeDashboardServiceClient.php new file mode 100644 index 00000000000..ef6a5ba51e3 --- /dev/null +++ b/Chronicle/src/V1/Client/NativeDashboardServiceClient.php @@ -0,0 +1,668 @@ + addChartAsync(AddChartRequest $request, array $optionalArgs = []) + * @method PromiseInterface createNativeDashboardAsync(CreateNativeDashboardRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteNativeDashboardAsync(DeleteNativeDashboardRequest $request, array $optionalArgs = []) + * @method PromiseInterface duplicateChartAsync(DuplicateChartRequest $request, array $optionalArgs = []) + * @method PromiseInterface duplicateNativeDashboardAsync(DuplicateNativeDashboardRequest $request, array $optionalArgs = []) + * @method PromiseInterface editChartAsync(EditChartRequest $request, array $optionalArgs = []) + * @method PromiseInterface exportNativeDashboardsAsync(ExportNativeDashboardsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getNativeDashboardAsync(GetNativeDashboardRequest $request, array $optionalArgs = []) + * @method PromiseInterface importNativeDashboardsAsync(ImportNativeDashboardsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listNativeDashboardsAsync(ListNativeDashboardsRequest $request, array $optionalArgs = []) + * @method PromiseInterface removeChartAsync(RemoveChartRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateNativeDashboardAsync(UpdateNativeDashboardRequest $request, array $optionalArgs = []) + */ +final class NativeDashboardServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.chronicle.v1.NativeDashboardService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'chronicle.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'chronicle.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/chronicle', + 'https://www.googleapis.com/auth/chronicle.readonly', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/native_dashboard_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/native_dashboard_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/native_dashboard_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/native_dashboard_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * dashboard_chart resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $chart + * + * @return string The formatted dashboard_chart resource. + */ + public static function dashboardChartName( + string $project, + string $location, + string $instance, + string $chart + ): string { + return self::getPathTemplate('dashboardChart')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'chart' => $chart, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * dashboard_query resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $query + * + * @return string The formatted dashboard_query resource. + */ + public static function dashboardQueryName( + string $project, + string $location, + string $instance, + string $query + ): string { + return self::getPathTemplate('dashboardQuery')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'query' => $query, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * native_dashboard resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $dashboard + * + * @return string The formatted native_dashboard resource. + */ + public static function nativeDashboardName( + string $project, + string $location, + string $instance, + string $dashboard + ): string { + return self::getPathTemplate('nativeDashboard')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'dashboard' => $dashboard, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - dashboardChart: projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart} + * - dashboardQuery: projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query} + * - instance: projects/{project}/locations/{location}/instances/{instance} + * - nativeDashboard: projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'chronicle.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Chronicle\V1\NativeDashboardServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new NativeDashboardServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Add chart in a dashboard. + * + * The async variant is {@see NativeDashboardServiceClient::addChartAsync()} . + * + * @example samples/V1/NativeDashboardServiceClient/add_chart.php + * + * @param AddChartRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AddChartResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function addChart(AddChartRequest $request, array $callOptions = []): AddChartResponse + { + return $this->startApiCall('AddChart', $request, $callOptions)->wait(); + } + + /** + * Create a dashboard. + * + * The async variant is + * {@see NativeDashboardServiceClient::createNativeDashboardAsync()} . + * + * @example samples/V1/NativeDashboardServiceClient/create_native_dashboard.php + * + * @param CreateNativeDashboardRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return NativeDashboard + * + * @throws ApiException Thrown if the API call fails. + */ + public function createNativeDashboard( + CreateNativeDashboardRequest $request, + array $callOptions = [] + ): NativeDashboard { + return $this->startApiCall('CreateNativeDashboard', $request, $callOptions)->wait(); + } + + /** + * Delete a dashboard. + * + * The async variant is + * {@see NativeDashboardServiceClient::deleteNativeDashboardAsync()} . + * + * @example samples/V1/NativeDashboardServiceClient/delete_native_dashboard.php + * + * @param DeleteNativeDashboardRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteNativeDashboard(DeleteNativeDashboardRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteNativeDashboard', $request, $callOptions)->wait(); + } + + /** + * Duplicate chart in a dashboard. + * + * The async variant is {@see NativeDashboardServiceClient::duplicateChartAsync()} + * . + * + * @example samples/V1/NativeDashboardServiceClient/duplicate_chart.php + * + * @param DuplicateChartRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DuplicateChartResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function duplicateChart(DuplicateChartRequest $request, array $callOptions = []): DuplicateChartResponse + { + return $this->startApiCall('DuplicateChart', $request, $callOptions)->wait(); + } + + /** + * Duplicate a dashboard. + * + * The async variant is + * {@see NativeDashboardServiceClient::duplicateNativeDashboardAsync()} . + * + * @example samples/V1/NativeDashboardServiceClient/duplicate_native_dashboard.php + * + * @param DuplicateNativeDashboardRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return NativeDashboard + * + * @throws ApiException Thrown if the API call fails. + */ + public function duplicateNativeDashboard( + DuplicateNativeDashboardRequest $request, + array $callOptions = [] + ): NativeDashboard { + return $this->startApiCall('DuplicateNativeDashboard', $request, $callOptions)->wait(); + } + + /** + * Edit chart in a dashboard. + * + * The async variant is {@see NativeDashboardServiceClient::editChartAsync()} . + * + * @example samples/V1/NativeDashboardServiceClient/edit_chart.php + * + * @param EditChartRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EditChartResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function editChart(EditChartRequest $request, array $callOptions = []): EditChartResponse + { + return $this->startApiCall('EditChart', $request, $callOptions)->wait(); + } + + /** + * Exports the dashboards. + * + * The async variant is + * {@see NativeDashboardServiceClient::exportNativeDashboardsAsync()} . + * + * @example samples/V1/NativeDashboardServiceClient/export_native_dashboards.php + * + * @param ExportNativeDashboardsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ExportNativeDashboardsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function exportNativeDashboards( + ExportNativeDashboardsRequest $request, + array $callOptions = [] + ): ExportNativeDashboardsResponse { + return $this->startApiCall('ExportNativeDashboards', $request, $callOptions)->wait(); + } + + /** + * Get a dashboard. + * + * The async variant is + * {@see NativeDashboardServiceClient::getNativeDashboardAsync()} . + * + * @example samples/V1/NativeDashboardServiceClient/get_native_dashboard.php + * + * @param GetNativeDashboardRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return NativeDashboard + * + * @throws ApiException Thrown if the API call fails. + */ + public function getNativeDashboard(GetNativeDashboardRequest $request, array $callOptions = []): NativeDashboard + { + return $this->startApiCall('GetNativeDashboard', $request, $callOptions)->wait(); + } + + /** + * Imports the dashboards. + * + * The async variant is + * {@see NativeDashboardServiceClient::importNativeDashboardsAsync()} . + * + * @example samples/V1/NativeDashboardServiceClient/import_native_dashboards.php + * + * @param ImportNativeDashboardsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ImportNativeDashboardsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function importNativeDashboards( + ImportNativeDashboardsRequest $request, + array $callOptions = [] + ): ImportNativeDashboardsResponse { + return $this->startApiCall('ImportNativeDashboards', $request, $callOptions)->wait(); + } + + /** + * List all dashboards. + * + * The async variant is + * {@see NativeDashboardServiceClient::listNativeDashboardsAsync()} . + * + * @example samples/V1/NativeDashboardServiceClient/list_native_dashboards.php + * + * @param ListNativeDashboardsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listNativeDashboards( + ListNativeDashboardsRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListNativeDashboards', $request, $callOptions); + } + + /** + * Remove chart from a dashboard. + * + * The async variant is {@see NativeDashboardServiceClient::removeChartAsync()} . + * + * @example samples/V1/NativeDashboardServiceClient/remove_chart.php + * + * @param RemoveChartRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return NativeDashboard + * + * @throws ApiException Thrown if the API call fails. + */ + public function removeChart(RemoveChartRequest $request, array $callOptions = []): NativeDashboard + { + return $this->startApiCall('RemoveChart', $request, $callOptions)->wait(); + } + + /** + * Update a dashboard. + * + * The async variant is + * {@see NativeDashboardServiceClient::updateNativeDashboardAsync()} . + * + * @example samples/V1/NativeDashboardServiceClient/update_native_dashboard.php + * + * @param UpdateNativeDashboardRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return NativeDashboard + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateNativeDashboard( + UpdateNativeDashboardRequest $request, + array $callOptions = [] + ): NativeDashboard { + return $this->startApiCall('UpdateNativeDashboard', $request, $callOptions)->wait(); + } +} diff --git a/Chronicle/src/V1/ColumnMetadata.php b/Chronicle/src/V1/ColumnMetadata.php new file mode 100644 index 00000000000..0cfa1245b75 --- /dev/null +++ b/Chronicle/src/V1/ColumnMetadata.php @@ -0,0 +1,383 @@ +google.cloud.chronicle.v1.ColumnMetadata + */ +class ColumnMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the column. + * + * Generated from protobuf field string column = 1; + */ + protected $column = ''; + /** + * Field path of the queried field, if any. + * + * Generated from protobuf field string field_path = 2; + */ + protected $field_path = ''; + /** + * Name of the function used to query the field, if any. + * + * Generated from protobuf field string function_name = 3; + */ + protected $function_name = ''; + /** + * Module of the function used to query the field, if any. + * + * Generated from protobuf field string function_module = 4; + */ + protected $function_module = ''; + /** + * Data source queried. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSource data_source = 5; + */ + protected $data_source = 0; + /** + * Timestamp Metadata + * + * Generated from protobuf field .google.cloud.chronicle.v1.TimestampMetadata timestamp_metadata = 6; + */ + protected $timestamp_metadata = null; + /** + * Whether the column is a longitude field. + * + * Generated from protobuf field bool longitude = 7; + */ + protected $longitude = false; + /** + * Whether the column is a latitude field. + * + * Generated from protobuf field bool latitude = 8; + */ + protected $latitude = false; + /** + * Whether the column is selected in the final response. + * + * Generated from protobuf field bool selected = 9; + */ + protected $selected = false; + /** + * Whether the column is unselected in the final response. + * + * Generated from protobuf field bool unselected = 10; + */ + protected $unselected = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $column + * Name of the column. + * @type string $field_path + * Field path of the queried field, if any. + * @type string $function_name + * Name of the function used to query the field, if any. + * @type string $function_module + * Module of the function used to query the field, if any. + * @type int $data_source + * Data source queried. + * @type \Google\Cloud\Chronicle\V1\TimestampMetadata $timestamp_metadata + * Timestamp Metadata + * @type bool $longitude + * Whether the column is a longitude field. + * @type bool $latitude + * Whether the column is a latitude field. + * @type bool $selected + * Whether the column is selected in the final response. + * @type bool $unselected + * Whether the column is unselected in the final response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * Name of the column. + * + * Generated from protobuf field string column = 1; + * @return string + */ + public function getColumn() + { + return $this->column; + } + + /** + * Name of the column. + * + * Generated from protobuf field string column = 1; + * @param string $var + * @return $this + */ + public function setColumn($var) + { + GPBUtil::checkString($var, True); + $this->column = $var; + + return $this; + } + + /** + * Field path of the queried field, if any. + * + * Generated from protobuf field string field_path = 2; + * @return string + */ + public function getFieldPath() + { + return $this->field_path; + } + + /** + * Field path of the queried field, if any. + * + * Generated from protobuf field string field_path = 2; + * @param string $var + * @return $this + */ + public function setFieldPath($var) + { + GPBUtil::checkString($var, True); + $this->field_path = $var; + + return $this; + } + + /** + * Name of the function used to query the field, if any. + * + * Generated from protobuf field string function_name = 3; + * @return string + */ + public function getFunctionName() + { + return $this->function_name; + } + + /** + * Name of the function used to query the field, if any. + * + * Generated from protobuf field string function_name = 3; + * @param string $var + * @return $this + */ + public function setFunctionName($var) + { + GPBUtil::checkString($var, True); + $this->function_name = $var; + + return $this; + } + + /** + * Module of the function used to query the field, if any. + * + * Generated from protobuf field string function_module = 4; + * @return string + */ + public function getFunctionModule() + { + return $this->function_module; + } + + /** + * Module of the function used to query the field, if any. + * + * Generated from protobuf field string function_module = 4; + * @param string $var + * @return $this + */ + public function setFunctionModule($var) + { + GPBUtil::checkString($var, True); + $this->function_module = $var; + + return $this; + } + + /** + * Data source queried. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSource data_source = 5; + * @return int + */ + public function getDataSource() + { + return $this->data_source; + } + + /** + * Data source queried. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSource data_source = 5; + * @param int $var + * @return $this + */ + public function setDataSource($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\DataSource::class); + $this->data_source = $var; + + return $this; + } + + /** + * Timestamp Metadata + * + * Generated from protobuf field .google.cloud.chronicle.v1.TimestampMetadata timestamp_metadata = 6; + * @return \Google\Cloud\Chronicle\V1\TimestampMetadata|null + */ + public function getTimestampMetadata() + { + return $this->timestamp_metadata; + } + + public function hasTimestampMetadata() + { + return isset($this->timestamp_metadata); + } + + public function clearTimestampMetadata() + { + unset($this->timestamp_metadata); + } + + /** + * Timestamp Metadata + * + * Generated from protobuf field .google.cloud.chronicle.v1.TimestampMetadata timestamp_metadata = 6; + * @param \Google\Cloud\Chronicle\V1\TimestampMetadata $var + * @return $this + */ + public function setTimestampMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\TimestampMetadata::class); + $this->timestamp_metadata = $var; + + return $this; + } + + /** + * Whether the column is a longitude field. + * + * Generated from protobuf field bool longitude = 7; + * @return bool + */ + public function getLongitude() + { + return $this->longitude; + } + + /** + * Whether the column is a longitude field. + * + * Generated from protobuf field bool longitude = 7; + * @param bool $var + * @return $this + */ + public function setLongitude($var) + { + GPBUtil::checkBool($var); + $this->longitude = $var; + + return $this; + } + + /** + * Whether the column is a latitude field. + * + * Generated from protobuf field bool latitude = 8; + * @return bool + */ + public function getLatitude() + { + return $this->latitude; + } + + /** + * Whether the column is a latitude field. + * + * Generated from protobuf field bool latitude = 8; + * @param bool $var + * @return $this + */ + public function setLatitude($var) + { + GPBUtil::checkBool($var); + $this->latitude = $var; + + return $this; + } + + /** + * Whether the column is selected in the final response. + * + * Generated from protobuf field bool selected = 9; + * @return bool + */ + public function getSelected() + { + return $this->selected; + } + + /** + * Whether the column is selected in the final response. + * + * Generated from protobuf field bool selected = 9; + * @param bool $var + * @return $this + */ + public function setSelected($var) + { + GPBUtil::checkBool($var); + $this->selected = $var; + + return $this; + } + + /** + * Whether the column is unselected in the final response. + * + * Generated from protobuf field bool unselected = 10; + * @return bool + */ + public function getUnselected() + { + return $this->unselected; + } + + /** + * Whether the column is unselected in the final response. + * + * Generated from protobuf field bool unselected = 10; + * @param bool $var + * @return $this + */ + public function setUnselected($var) + { + GPBUtil::checkBool($var); + $this->unselected = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/CreateNativeDashboardRequest.php b/Chronicle/src/V1/CreateNativeDashboardRequest.php new file mode 100644 index 00000000000..5e04ec90a01 --- /dev/null +++ b/Chronicle/src/V1/CreateNativeDashboardRequest.php @@ -0,0 +1,132 @@ +google.cloud.chronicle.v1.CreateNativeDashboardRequest + */ +class CreateNativeDashboardRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this dashboard will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The dashboard to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard native_dashboard = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $native_dashboard = null; + + /** + * @param string $parent Required. The parent resource where this dashboard will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * Please see {@see NativeDashboardServiceClient::instanceName()} for help formatting this field. + * @param \Google\Cloud\Chronicle\V1\NativeDashboard $nativeDashboard Required. The dashboard to create. + * + * @return \Google\Cloud\Chronicle\V1\CreateNativeDashboardRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Chronicle\V1\NativeDashboard $nativeDashboard): self + { + return (new self()) + ->setParent($parent) + ->setNativeDashboard($nativeDashboard); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this dashboard will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * @type \Google\Cloud\Chronicle\V1\NativeDashboard $native_dashboard + * Required. The dashboard to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this dashboard will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where this dashboard will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The dashboard to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard native_dashboard = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\NativeDashboard|null + */ + public function getNativeDashboard() + { + return $this->native_dashboard; + } + + public function hasNativeDashboard() + { + return isset($this->native_dashboard); + } + + public function clearNativeDashboard() + { + unset($this->native_dashboard); + } + + /** + * Required. The dashboard to create. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard native_dashboard = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\NativeDashboard $var + * @return $this + */ + public function setNativeDashboard($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\NativeDashboard::class); + $this->native_dashboard = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardAccess.php b/Chronicle/src/V1/DashboardAccess.php new file mode 100644 index 00000000000..e51b5683efc --- /dev/null +++ b/Chronicle/src/V1/DashboardAccess.php @@ -0,0 +1,61 @@ +google.cloud.chronicle.v1.DashboardAccess + */ +class DashboardAccess +{ + /** + * Default unspecified. + * + * Generated from protobuf enum DASHBOARD_ACCESS_UNSPECIFIED = 0; + */ + const DASHBOARD_ACCESS_UNSPECIFIED = 0; + /** + * Private dashboards created by users/customers. + * + * Generated from protobuf enum DASHBOARD_PRIVATE = 1; + */ + const DASHBOARD_PRIVATE = 1; + /** + * Public dashboards created by users/customers. + * + * Generated from protobuf enum DASHBOARD_PUBLIC = 2; + */ + const DASHBOARD_PUBLIC = 2; + + private static $valueToName = [ + self::DASHBOARD_ACCESS_UNSPECIFIED => 'DASHBOARD_ACCESS_UNSPECIFIED', + self::DASHBOARD_PRIVATE => 'DASHBOARD_PRIVATE', + self::DASHBOARD_PUBLIC => 'DASHBOARD_PUBLIC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/DashboardChart.php b/Chronicle/src/V1/DashboardChart.php new file mode 100644 index 00000000000..952bcdd0a76 --- /dev/null +++ b/Chronicle/src/V1/DashboardChart.php @@ -0,0 +1,431 @@ +google.cloud.chronicle.v1.DashboardChart + */ +class DashboardChart extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Name of the dashboardChart. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Display name/Title of the dashboardChart visible to users. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Optional. Description of the dashboardChart. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. NativeDashboard this chart belongs to. + * + * Generated from protobuf field string native_dashboard = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $native_dashboard = ''; + /** + * Optional. Type of tile i.e., visualization, button or text. + * + * Generated from protobuf field .google.cloud.chronicle.v1.TileType tile_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $tile_type = 0; + /** + * Optional. Query and datasource used in the chart. Should be empty for + * Button Tiles. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.ChartDatasource chart_datasource = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $chart_datasource = null; + /** + * Required. Depending on tile_type one of below fields will be required. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization visualization = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $visualization = null; + /** + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + /** + * Optional. Drill down configuration. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig drill_down_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $drill_down_config = null; + /** + * Optional. List of Advanced Filter tokens used in this chart's query (e.g., + * "hostname", "ip"). This allows the UI to identify dependencies without + * parsing the query text. The tokens are stored without the wrapping '$' + * characters. + * The number of tokens are not expected to be more than 10. + * + * Generated from protobuf field repeated string tokens = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $tokens; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Name of the dashboardChart. + * @type string $display_name + * Required. Display name/Title of the dashboardChart visible to users. + * @type string $description + * Optional. Description of the dashboardChart. + * @type string $native_dashboard + * Output only. NativeDashboard this chart belongs to. + * @type int $tile_type + * Optional. Type of tile i.e., visualization, button or text. + * @type \Google\Cloud\Chronicle\V1\DashboardChart\ChartDatasource $chart_datasource + * Optional. Query and datasource used in the chart. Should be empty for + * Button Tiles. + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization $visualization + * Required. Depending on tile_type one of below fields will be required. + * @type string $etag + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @type \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig $drill_down_config + * Optional. Drill down configuration. + * @type string[] $tokens + * Optional. List of Advanced Filter tokens used in this chart's query (e.g., + * "hostname", "ip"). This allows the UI to identify dependencies without + * parsing the query text. The tokens are stored without the wrapping '$' + * characters. + * The number of tokens are not expected to be more than 10. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Name of the dashboardChart. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Name of the dashboardChart. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Display name/Title of the dashboardChart visible to users. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. Display name/Title of the dashboardChart visible to users. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. Description of the dashboardChart. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the dashboardChart. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. NativeDashboard this chart belongs to. + * + * Generated from protobuf field string native_dashboard = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getNativeDashboard() + { + return $this->native_dashboard; + } + + /** + * Output only. NativeDashboard this chart belongs to. + * + * Generated from protobuf field string native_dashboard = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNativeDashboard($var) + { + GPBUtil::checkString($var, True); + $this->native_dashboard = $var; + + return $this; + } + + /** + * Optional. Type of tile i.e., visualization, button or text. + * + * Generated from protobuf field .google.cloud.chronicle.v1.TileType tile_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTileType() + { + return $this->tile_type; + } + + /** + * Optional. Type of tile i.e., visualization, button or text. + * + * Generated from protobuf field .google.cloud.chronicle.v1.TileType tile_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTileType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\TileType::class); + $this->tile_type = $var; + + return $this; + } + + /** + * Optional. Query and datasource used in the chart. Should be empty for + * Button Tiles. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.ChartDatasource chart_datasource = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\ChartDatasource|null + */ + public function getChartDatasource() + { + return $this->chart_datasource; + } + + public function hasChartDatasource() + { + return isset($this->chart_datasource); + } + + public function clearChartDatasource() + { + unset($this->chart_datasource); + } + + /** + * Optional. Query and datasource used in the chart. Should be empty for + * Button Tiles. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.ChartDatasource chart_datasource = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\ChartDatasource $var + * @return $this + */ + public function setChartDatasource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\ChartDatasource::class); + $this->chart_datasource = $var; + + return $this; + } + + /** + * Required. Depending on tile_type one of below fields will be required. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization visualization = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\Visualization|null + */ + public function getVisualization() + { + return $this->visualization; + } + + public function hasVisualization() + { + return isset($this->visualization); + } + + public function clearVisualization() + { + unset($this->visualization); + } + + /** + * Required. Depending on tile_type one of below fields will be required. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization visualization = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization $var + * @return $this + */ + public function setVisualization($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization::class); + $this->visualization = $var; + + return $this; + } + + /** + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Optional. Drill down configuration. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig drill_down_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig|null + */ + public function getDrillDownConfig() + { + return $this->drill_down_config; + } + + public function hasDrillDownConfig() + { + return isset($this->drill_down_config); + } + + public function clearDrillDownConfig() + { + unset($this->drill_down_config); + } + + /** + * Optional. Drill down configuration. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig drill_down_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig $var + * @return $this + */ + public function setDrillDownConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig::class); + $this->drill_down_config = $var; + + return $this; + } + + /** + * Optional. List of Advanced Filter tokens used in this chart's query (e.g., + * "hostname", "ip"). This allows the UI to identify dependencies without + * parsing the query text. The tokens are stored without the wrapping '$' + * characters. + * The number of tokens are not expected to be more than 10. + * + * Generated from protobuf field repeated string tokens = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getTokens() + { + return $this->tokens; + } + + /** + * Optional. List of Advanced Filter tokens used in this chart's query (e.g., + * "hostname", "ip"). This allows the UI to identify dependencies without + * parsing the query text. The tokens are stored without the wrapping '$' + * characters. + * The number of tokens are not expected to be more than 10. + * + * Generated from protobuf field repeated string tokens = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setTokens($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tokens = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/ChartDatasource.php b/Chronicle/src/V1/DashboardChart/ChartDatasource.php new file mode 100644 index 00000000000..7e4895cd74a --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/ChartDatasource.php @@ -0,0 +1,101 @@ +google.cloud.chronicle.v1.DashboardChart.ChartDatasource + */ +class ChartDatasource extends \Google\Protobuf\Internal\Message +{ + /** + * Reference to dashboard query resource used in the chart. + * + * Generated from protobuf field string dashboard_query = 1 [(.google.api.resource_reference) = { + */ + protected $dashboard_query = ''; + /** + * Name of the datasource used in the chart. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataSource data_sources = 3; + */ + private $data_sources; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dashboard_query + * Reference to dashboard query resource used in the chart. + * @type int[] $data_sources + * Name of the datasource used in the chart. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Reference to dashboard query resource used in the chart. + * + * Generated from protobuf field string dashboard_query = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getDashboardQuery() + { + return $this->dashboard_query; + } + + /** + * Reference to dashboard query resource used in the chart. + * + * Generated from protobuf field string dashboard_query = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDashboardQuery($var) + { + GPBUtil::checkString($var, True); + $this->dashboard_query = $var; + + return $this; + } + + /** + * Name of the datasource used in the chart. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataSource data_sources = 3; + * @return RepeatedField + */ + public function getDataSources() + { + return $this->data_sources; + } + + /** + * Name of the datasource used in the chart. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataSource data_sources = 3; + * @param int[] $var + * @return $this + */ + public function setDataSources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Chronicle\V1\DataSource::class); + $this->data_sources = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/DrillDownConfig.php b/Chronicle/src/V1/DashboardChart/DrillDownConfig.php new file mode 100644 index 00000000000..57aacc8685c --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/DrillDownConfig.php @@ -0,0 +1,101 @@ +google.cloud.chronicle.v1.DashboardChart.DrillDownConfig + */ +class DrillDownConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Left click drill downs. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown left_drill_downs = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $left_drill_downs; + /** + * Required. Right click drill downs. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown right_drill_downs = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $right_drill_downs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown[] $left_drill_downs + * Required. Left click drill downs. + * @type \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown[] $right_drill_downs + * Required. Right click drill downs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Required. Left click drill downs. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown left_drill_downs = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown> + */ + public function getLeftDrillDowns() + { + return $this->left_drill_downs; + } + + /** + * Required. Left click drill downs. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown left_drill_downs = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown[] $var + * @return $this + */ + public function setLeftDrillDowns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown::class); + $this->left_drill_downs = $arr; + + return $this; + } + + /** + * Required. Right click drill downs. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown right_drill_downs = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown> + */ + public function getRightDrillDowns() + { + return $this->right_drill_downs; + } + + /** + * Required. Right click drill downs. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown right_drill_downs = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown[] $var + * @return $this + */ + public function setRightDrillDowns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown::class); + $this->right_drill_downs = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown.php b/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown.php new file mode 100644 index 00000000000..b6c23fd7a06 --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown.php @@ -0,0 +1,176 @@ +google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown + */ +class DrillDown extends \Google\Protobuf\Internal\Message +{ + /** + * Required. ID of the drill down. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $id = ''; + /** + * Required. Display name of the drill down. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + protected $settings; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\DefaultDrillDownSettings $default_settings + * Default drill down settings. + * @type \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\CustomDrillDownSettings $custom_settings + * Custom drill down settings. + * @type string $id + * Required. ID of the drill down. + * @type string $display_name + * Required. Display name of the drill down. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Default drill down settings. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.DefaultDrillDownSettings default_settings = 3; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\DefaultDrillDownSettings|null + */ + public function getDefaultSettings() + { + return $this->readOneof(3); + } + + public function hasDefaultSettings() + { + return $this->hasOneof(3); + } + + /** + * Default drill down settings. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.DefaultDrillDownSettings default_settings = 3; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\DefaultDrillDownSettings $var + * @return $this + */ + public function setDefaultSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\DefaultDrillDownSettings::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Custom drill down settings. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings custom_settings = 4; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\CustomDrillDownSettings|null + */ + public function getCustomSettings() + { + return $this->readOneof(4); + } + + public function hasCustomSettings() + { + return $this->hasOneof(4); + } + + /** + * Custom drill down settings. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings custom_settings = 4; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\CustomDrillDownSettings $var + * @return $this + */ + public function setCustomSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\CustomDrillDownSettings::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Required. ID of the drill down. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Required. ID of the drill down. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Required. Display name of the drill down. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. Display name of the drill down. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * @return string + */ + public function getSettings() + { + return $this->whichOneof("settings"); + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown/CustomDrillDownSettings.php b/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown/CustomDrillDownSettings.php new file mode 100644 index 00000000000..51779e14d83 --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown/CustomDrillDownSettings.php @@ -0,0 +1,213 @@ +google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings + */ +class CustomDrillDownSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Whether to open the drill down action in a new tab. + * + * Generated from protobuf field bool new_tab = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $new_tab = false; + /** + * Optional. Table chart column name to associate the custom drill down + * action on left click. + * + * Generated from protobuf field string left_click_column = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $left_click_column = ''; + protected $action; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\CustomDrillDownSettings\DrillDownQuery $query + * Drill down query action config. + * @type \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\CustomDrillDownSettings\DrillDownFilter $filter + * Drill down filter action config. + * @type \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\CustomDrillDownSettings\DrillDownExternalLink $external_link + * Drill down external link action config. + * @type bool $new_tab + * Required. Whether to open the drill down action in a new tab. + * @type string $left_click_column + * Optional. Table chart column name to associate the custom drill down + * action on left click. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Drill down query action config. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownQuery query = 3; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\CustomDrillDownSettings\DrillDownQuery|null + */ + public function getQuery() + { + return $this->readOneof(3); + } + + public function hasQuery() + { + return $this->hasOneof(3); + } + + /** + * Drill down query action config. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownQuery query = 3; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\CustomDrillDownSettings\DrillDownQuery $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\CustomDrillDownSettings\DrillDownQuery::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Drill down filter action config. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter filter = 4; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\CustomDrillDownSettings\DrillDownFilter|null + */ + public function getFilter() + { + return $this->readOneof(4); + } + + public function hasFilter() + { + return $this->hasOneof(4); + } + + /** + * Drill down filter action config. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter filter = 4; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\CustomDrillDownSettings\DrillDownFilter $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\CustomDrillDownSettings\DrillDownFilter::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Drill down external link action config. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownExternalLink external_link = 5; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\CustomDrillDownSettings\DrillDownExternalLink|null + */ + public function getExternalLink() + { + return $this->readOneof(5); + } + + public function hasExternalLink() + { + return $this->hasOneof(5); + } + + /** + * Drill down external link action config. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownExternalLink external_link = 5; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\CustomDrillDownSettings\DrillDownExternalLink $var + * @return $this + */ + public function setExternalLink($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\CustomDrillDownSettings\DrillDownExternalLink::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Required. Whether to open the drill down action in a new tab. + * + * Generated from protobuf field bool new_tab = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getNewTab() + { + return $this->new_tab; + } + + /** + * Required. Whether to open the drill down action in a new tab. + * + * Generated from protobuf field bool new_tab = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setNewTab($var) + { + GPBUtil::checkBool($var); + $this->new_tab = $var; + + return $this; + } + + /** + * Optional. Table chart column name to associate the custom drill down + * action on left click. + * + * Generated from protobuf field string left_click_column = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLeftClickColumn() + { + return $this->left_click_column; + } + + /** + * Optional. Table chart column name to associate the custom drill down + * action on left click. + * + * Generated from protobuf field string left_click_column = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLeftClickColumn($var) + { + GPBUtil::checkString($var, True); + $this->left_click_column = $var; + + return $this; + } + + /** + * @return string + */ + public function getAction() + { + return $this->whichOneof("action"); + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown/CustomDrillDownSettings/DrillDownExternalLink.php b/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown/CustomDrillDownSettings/DrillDownExternalLink.php new file mode 100644 index 00000000000..40700f5c4d0 --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown/CustomDrillDownSettings/DrillDownExternalLink.php @@ -0,0 +1,101 @@ +google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownExternalLink + */ +class DrillDownExternalLink extends \Google\Protobuf\Internal\Message +{ + /** + * Required. External link the drill down action should redirect to. + * + * Generated from protobuf field string link = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $link = ''; + /** + * Optional. Description of the external link. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $link + * Required. External link the drill down action should redirect to. + * @type string $description + * Optional. Description of the external link. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Required. External link the drill down action should redirect to. + * + * Generated from protobuf field string link = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLink() + { + return $this->link; + } + + /** + * Required. External link the drill down action should redirect to. + * + * Generated from protobuf field string link = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLink($var) + { + GPBUtil::checkString($var, True); + $this->link = $var; + + return $this; + } + + /** + * Optional. Description of the external link. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the external link. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown/CustomDrillDownSettings/DrillDownFilter.php b/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown/CustomDrillDownSettings/DrillDownFilter.php new file mode 100644 index 00000000000..ec6d39b1562 --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown/CustomDrillDownSettings/DrillDownFilter.php @@ -0,0 +1,67 @@ +google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter + */ +class DrillDownFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Dashboard filters to be applied on drill down. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter.DrillDownDashboardFilter dashboard_filters = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $dashboard_filters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\CustomDrillDownSettings\DrillDownFilter\DrillDownDashboardFilter[] $dashboard_filters + * Required. Dashboard filters to be applied on drill down. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Required. Dashboard filters to be applied on drill down. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter.DrillDownDashboardFilter dashboard_filters = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\CustomDrillDownSettings\DrillDownFilter\DrillDownDashboardFilter> + */ + public function getDashboardFilters() + { + return $this->dashboard_filters; + } + + /** + * Required. Dashboard filters to be applied on drill down. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter.DrillDownDashboardFilter dashboard_filters = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\CustomDrillDownSettings\DrillDownFilter\DrillDownDashboardFilter[] $var + * @return $this + */ + public function setDashboardFilters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DashboardChart\DrillDownConfig\DrillDown\CustomDrillDownSettings\DrillDownFilter\DrillDownDashboardFilter::class); + $this->dashboard_filters = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown/CustomDrillDownSettings/DrillDownFilter/DrillDownDashboardFilter.php b/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown/CustomDrillDownSettings/DrillDownFilter/DrillDownDashboardFilter.php new file mode 100644 index 00000000000..31976604ae3 --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown/CustomDrillDownSettings/DrillDownFilter/DrillDownDashboardFilter.php @@ -0,0 +1,105 @@ +google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter.DrillDownDashboardFilter + */ +class DrillDownDashboardFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Required. ID of the dashboard filter. + * + * Generated from protobuf field string dashboard_filter_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dashboard_filter_id = ''; + /** + * Required. Filter operator and field values for the dashboard + * filter. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.FilterOperatorAndValues filter_operator_and_values = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $filter_operator_and_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dashboard_filter_id + * Required. ID of the dashboard filter. + * @type \Google\Cloud\Chronicle\V1\FilterOperatorAndValues[] $filter_operator_and_values + * Required. Filter operator and field values for the dashboard + * filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Required. ID of the dashboard filter. + * + * Generated from protobuf field string dashboard_filter_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDashboardFilterId() + { + return $this->dashboard_filter_id; + } + + /** + * Required. ID of the dashboard filter. + * + * Generated from protobuf field string dashboard_filter_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDashboardFilterId($var) + { + GPBUtil::checkString($var, True); + $this->dashboard_filter_id = $var; + + return $this; + } + + /** + * Required. Filter operator and field values for the dashboard + * filter. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.FilterOperatorAndValues filter_operator_and_values = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\FilterOperatorAndValues> + */ + public function getFilterOperatorAndValues() + { + return $this->filter_operator_and_values; + } + + /** + * Required. Filter operator and field values for the dashboard + * filter. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.FilterOperatorAndValues filter_operator_and_values = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\FilterOperatorAndValues[] $var + * @return $this + */ + public function setFilterOperatorAndValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\FilterOperatorAndValues::class); + $this->filter_operator_and_values = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown/CustomDrillDownSettings/DrillDownQuery.php b/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown/CustomDrillDownSettings/DrillDownQuery.php new file mode 100644 index 00000000000..ed1b8a5b57d --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown/CustomDrillDownSettings/DrillDownQuery.php @@ -0,0 +1,67 @@ +google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownQuery + */ +class DrillDownQuery extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Search query to be executed on drill down. + * + * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query + * Required. Search query to be executed on drill down. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Required. Search query to be executed on drill down. + * + * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Required. Search query to be executed on drill down. + * + * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown/DefaultDrillDownSettings.php b/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown/DefaultDrillDownSettings.php new file mode 100644 index 00000000000..ddb7719040b --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/DrillDownConfig/DrillDown/DefaultDrillDownSettings.php @@ -0,0 +1,67 @@ +google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.DefaultDrillDownSettings + */ +class DefaultDrillDownSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Whether the default drill down is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * Required. Whether the default drill down is enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Required. Whether the default drill down is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Required. Whether the default drill down is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization.php b/Chronicle/src/V1/DashboardChart/Visualization.php new file mode 100644 index 00000000000..af7b13fb1d9 --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization.php @@ -0,0 +1,533 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization + */ +class Visualization extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.Axis x_axes = 7; + */ + private $x_axes; + /** + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.Axis y_axes = 8; + */ + private $y_axes; + /** + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.Series series = 3; + */ + private $series; + /** + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Tooltip tooltip = 4; + */ + protected $tooltip = null; + /** + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.Legend legends = 9; + */ + private $legends; + /** + * Column Definition to represent chart as a table. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnDef column_defs = 10; + */ + private $column_defs; + /** + * Optional. Configuration for table appearance. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.TableConfig table_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $table_config = null; + /** + * Button config for a chart if tileType is TILE_TYPE_BUTTON. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Button button = 11; + */ + protected $button = null; + /** + * Optional. Markdown config for a chart if tileType is TILE_TYPE_MARKDOWN. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Markdown markdown = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $markdown = null; + /** + * Optional. Selected column for series + * + * Generated from protobuf field repeated string series_column = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $series_column; + /** + * Optional. Selected grouping type for series + * + * Generated from protobuf field string grouping_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $grouping_type = ''; + /** + * Optional. Google Maps config for a chart if type is GOOGLE MAPS. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig google_maps_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $google_maps_config = null; + /** + * Optional. Whether threshold coloring is enabled for the chart. If it's + * enabled, the chart will be colored based on the values stored in + * VisualMap below. + * + * Generated from protobuf field bool threshold_coloring_enabled = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $threshold_coloring_enabled = false; + /** + * Optional. Visual maps for the chart. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap visual_maps = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $visual_maps; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Axis[] $x_axes + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Axis[] $y_axes + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series[] $series + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Tooltip $tooltip + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Legend[] $legends + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\ColumnDef[] $column_defs + * Column Definition to represent chart as a table. + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\TableConfig $table_config + * Optional. Configuration for table appearance. + * @type \Google\Cloud\Chronicle\V1\Button $button + * Button config for a chart if tileType is TILE_TYPE_BUTTON. + * @type \Google\Cloud\Chronicle\V1\Markdown $markdown + * Optional. Markdown config for a chart if tileType is TILE_TYPE_MARKDOWN. + * @type string[] $series_column + * Optional. Selected column for series + * @type string $grouping_type + * Optional. Selected grouping type for series + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\GoogleMapsConfig $google_maps_config + * Optional. Google Maps config for a chart if type is GOOGLE MAPS. + * @type bool $threshold_coloring_enabled + * Optional. Whether threshold coloring is enabled for the chart. If it's + * enabled, the chart will be colored based on the values stored in + * VisualMap below. + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\VisualMap[] $visual_maps + * Optional. Visual maps for the chart. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.Axis x_axes = 7; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Axis> + */ + public function getXAxes() + { + return $this->x_axes; + } + + /** + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.Axis x_axes = 7; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Axis[] $var + * @return $this + */ + public function setXAxes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Axis::class); + $this->x_axes = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.Axis y_axes = 8; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Axis> + */ + public function getYAxes() + { + return $this->y_axes; + } + + /** + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.Axis y_axes = 8; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Axis[] $var + * @return $this + */ + public function setYAxes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Axis::class); + $this->y_axes = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.Series series = 3; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series> + */ + public function getSeries() + { + return $this->series; + } + + /** + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.Series series = 3; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series[] $var + * @return $this + */ + public function setSeries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series::class); + $this->series = $arr; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Tooltip tooltip = 4; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Tooltip|null + */ + public function getTooltip() + { + return $this->tooltip; + } + + public function hasTooltip() + { + return isset($this->tooltip); + } + + public function clearTooltip() + { + unset($this->tooltip); + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Tooltip tooltip = 4; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Tooltip $var + * @return $this + */ + public function setTooltip($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Tooltip::class); + $this->tooltip = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.Legend legends = 9; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Legend> + */ + public function getLegends() + { + return $this->legends; + } + + /** + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.Legend legends = 9; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Legend[] $var + * @return $this + */ + public function setLegends($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Legend::class); + $this->legends = $arr; + + return $this; + } + + /** + * Column Definition to represent chart as a table. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnDef column_defs = 10; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DashboardChart\Visualization\ColumnDef> + */ + public function getColumnDefs() + { + return $this->column_defs; + } + + /** + * Column Definition to represent chart as a table. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnDef column_defs = 10; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\ColumnDef[] $var + * @return $this + */ + public function setColumnDefs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\ColumnDef::class); + $this->column_defs = $arr; + + return $this; + } + + /** + * Optional. Configuration for table appearance. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.TableConfig table_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\TableConfig|null + */ + public function getTableConfig() + { + return $this->table_config; + } + + public function hasTableConfig() + { + return isset($this->table_config); + } + + public function clearTableConfig() + { + unset($this->table_config); + } + + /** + * Optional. Configuration for table appearance. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.TableConfig table_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\TableConfig $var + * @return $this + */ + public function setTableConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\TableConfig::class); + $this->table_config = $var; + + return $this; + } + + /** + * Button config for a chart if tileType is TILE_TYPE_BUTTON. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Button button = 11; + * @return \Google\Cloud\Chronicle\V1\Button|null + */ + public function getButton() + { + return $this->button; + } + + public function hasButton() + { + return isset($this->button); + } + + public function clearButton() + { + unset($this->button); + } + + /** + * Button config for a chart if tileType is TILE_TYPE_BUTTON. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Button button = 11; + * @param \Google\Cloud\Chronicle\V1\Button $var + * @return $this + */ + public function setButton($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Button::class); + $this->button = $var; + + return $this; + } + + /** + * Optional. Markdown config for a chart if tileType is TILE_TYPE_MARKDOWN. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Markdown markdown = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\Markdown|null + */ + public function getMarkdown() + { + return $this->markdown; + } + + public function hasMarkdown() + { + return isset($this->markdown); + } + + public function clearMarkdown() + { + unset($this->markdown); + } + + /** + * Optional. Markdown config for a chart if tileType is TILE_TYPE_MARKDOWN. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Markdown markdown = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\Markdown $var + * @return $this + */ + public function setMarkdown($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Markdown::class); + $this->markdown = $var; + + return $this; + } + + /** + * Optional. Selected column for series + * + * Generated from protobuf field repeated string series_column = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getSeriesColumn() + { + return $this->series_column; + } + + /** + * Optional. Selected column for series + * + * Generated from protobuf field repeated string series_column = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setSeriesColumn($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->series_column = $arr; + + return $this; + } + + /** + * Optional. Selected grouping type for series + * + * Generated from protobuf field string grouping_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getGroupingType() + { + return $this->grouping_type; + } + + /** + * Optional. Selected grouping type for series + * + * Generated from protobuf field string grouping_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setGroupingType($var) + { + GPBUtil::checkString($var, True); + $this->grouping_type = $var; + + return $this; + } + + /** + * Optional. Google Maps config for a chart if type is GOOGLE MAPS. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig google_maps_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\GoogleMapsConfig|null + */ + public function getGoogleMapsConfig() + { + return $this->google_maps_config; + } + + public function hasGoogleMapsConfig() + { + return isset($this->google_maps_config); + } + + public function clearGoogleMapsConfig() + { + unset($this->google_maps_config); + } + + /** + * Optional. Google Maps config for a chart if type is GOOGLE MAPS. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig google_maps_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\GoogleMapsConfig $var + * @return $this + */ + public function setGoogleMapsConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\GoogleMapsConfig::class); + $this->google_maps_config = $var; + + return $this; + } + + /** + * Optional. Whether threshold coloring is enabled for the chart. If it's + * enabled, the chart will be colored based on the values stored in + * VisualMap below. + * + * Generated from protobuf field bool threshold_coloring_enabled = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getThresholdColoringEnabled() + { + return $this->threshold_coloring_enabled; + } + + /** + * Optional. Whether threshold coloring is enabled for the chart. If it's + * enabled, the chart will be colored based on the values stored in + * VisualMap below. + * + * Generated from protobuf field bool threshold_coloring_enabled = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setThresholdColoringEnabled($var) + { + GPBUtil::checkBool($var); + $this->threshold_coloring_enabled = $var; + + return $this; + } + + /** + * Optional. Visual maps for the chart. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap visual_maps = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DashboardChart\Visualization\VisualMap> + */ + public function getVisualMaps() + { + return $this->visual_maps; + } + + /** + * Optional. Visual maps for the chart. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap visual_maps = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\VisualMap[] $var + * @return $this + */ + public function setVisualMaps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\VisualMap::class); + $this->visual_maps = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/Axis.php b/Chronicle/src/V1/DashboardChart/Visualization/Axis.php new file mode 100644 index 00000000000..b7d063f2cbc --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/Axis.php @@ -0,0 +1,181 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.Axis + */ +class Axis extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .google.cloud.chronicle.v1.AxisType axis_type = 4; + */ + protected $axis_type = 0; + /** + * Generated from protobuf field string display_name = 5; + */ + protected $display_name = ''; + /** + * Minimum value to be rendered in ECharts as per + * https://echarts.apache.org/en/option.html#xAxis.min + * + * Generated from protobuf field optional int32 min = 6; + */ + protected $min = null; + /** + * Maximum value to be rendered in ECharts as per + * https://echarts.apache.org/en/option.html#xAxis.max + * + * Generated from protobuf field optional int32 max = 7; + */ + protected $max = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $axis_type + * @type string $display_name + * @type int $min + * Minimum value to be rendered in ECharts as per + * https://echarts.apache.org/en/option.html#xAxis.min + * @type int $max + * Maximum value to be rendered in ECharts as per + * https://echarts.apache.org/en/option.html#xAxis.max + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.AxisType axis_type = 4; + * @return int + */ + public function getAxisType() + { + return $this->axis_type; + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.AxisType axis_type = 4; + * @param int $var + * @return $this + */ + public function setAxisType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\AxisType::class); + $this->axis_type = $var; + + return $this; + } + + /** + * Generated from protobuf field string display_name = 5; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Generated from protobuf field string display_name = 5; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Minimum value to be rendered in ECharts as per + * https://echarts.apache.org/en/option.html#xAxis.min + * + * Generated from protobuf field optional int32 min = 6; + * @return int + */ + public function getMin() + { + return isset($this->min) ? $this->min : 0; + } + + public function hasMin() + { + return isset($this->min); + } + + public function clearMin() + { + unset($this->min); + } + + /** + * Minimum value to be rendered in ECharts as per + * https://echarts.apache.org/en/option.html#xAxis.min + * + * Generated from protobuf field optional int32 min = 6; + * @param int $var + * @return $this + */ + public function setMin($var) + { + GPBUtil::checkInt32($var); + $this->min = $var; + + return $this; + } + + /** + * Maximum value to be rendered in ECharts as per + * https://echarts.apache.org/en/option.html#xAxis.max + * + * Generated from protobuf field optional int32 max = 7; + * @return int + */ + public function getMax() + { + return isset($this->max) ? $this->max : 0; + } + + public function hasMax() + { + return isset($this->max); + } + + public function clearMax() + { + unset($this->max); + } + + /** + * Maximum value to be rendered in ECharts as per + * https://echarts.apache.org/en/option.html#xAxis.max + * + * Generated from protobuf field optional int32 max = 7; + * @param int $var + * @return $this + */ + public function setMax($var) + { + GPBUtil::checkInt32($var); + $this->max = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/ColumnDef.php b/Chronicle/src/V1/DashboardChart/Visualization/ColumnDef.php new file mode 100644 index 00000000000..1455eed4278 --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/ColumnDef.php @@ -0,0 +1,101 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnDef + */ +class ColumnDef extends \Google\Protobuf\Internal\Message +{ + /** + * Field key in data. + * + * Generated from protobuf field string field = 1; + */ + protected $field = ''; + /** + * Header name for column. + * + * Generated from protobuf field string header = 2; + */ + protected $header = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field + * Field key in data. + * @type string $header + * Header name for column. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Field key in data. + * + * Generated from protobuf field string field = 1; + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * Field key in data. + * + * Generated from protobuf field string field = 1; + * @param string $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkString($var, True); + $this->field = $var; + + return $this; + } + + /** + * Header name for column. + * + * Generated from protobuf field string header = 2; + * @return string + */ + public function getHeader() + { + return $this->header; + } + + /** + * Header name for column. + * + * Generated from protobuf field string header = 2; + * @param string $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkString($var, True); + $this->header = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/ColumnRenderTypeSettings.php b/Chronicle/src/V1/DashboardChart/Visualization/ColumnRenderTypeSettings.php new file mode 100644 index 00000000000..fdcdde1cf7b --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/ColumnRenderTypeSettings.php @@ -0,0 +1,102 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnRenderTypeSettings + */ +class ColumnRenderTypeSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field key in data. + * + * Generated from protobuf field string field = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $field = ''; + /** + * Optional. Column render type. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RenderType column_render_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $column_render_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field + * Optional. Field key in data. + * @type int $column_render_type + * Optional. Column render type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field key in data. + * + * Generated from protobuf field string field = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * Optional. Field key in data. + * + * Generated from protobuf field string field = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkString($var, True); + $this->field = $var; + + return $this; + } + + /** + * Optional. Column render type. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RenderType column_render_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getColumnRenderType() + { + return $this->column_render_type; + } + + /** + * Optional. Column render type. + * + * Generated from protobuf field .google.cloud.chronicle.v1.RenderType column_render_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setColumnRenderType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\RenderType::class); + $this->column_render_type = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/ColumnTooltipSettings.php b/Chronicle/src/V1/DashboardChart/Visualization/ColumnTooltipSettings.php new file mode 100644 index 00000000000..55a4cb54c72 --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/ColumnTooltipSettings.php @@ -0,0 +1,135 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnTooltipSettings + */ +class ColumnTooltipSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field key in data. + * + * Generated from protobuf field string field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $field = ''; + /** + * Optional. Column header tooltip text. + * + * Generated from protobuf field string header_tooltip_text = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $header_tooltip_text = ''; + /** + * Optional. Column cell tooltip text. + * + * Generated from protobuf field string cell_tooltip_text = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cell_tooltip_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field + * Required. Field key in data. + * @type string $header_tooltip_text + * Optional. Column header tooltip text. + * @type string $cell_tooltip_text + * Optional. Column cell tooltip text. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field key in data. + * + * Generated from protobuf field string field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * Required. Field key in data. + * + * Generated from protobuf field string field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkString($var, True); + $this->field = $var; + + return $this; + } + + /** + * Optional. Column header tooltip text. + * + * Generated from protobuf field string header_tooltip_text = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getHeaderTooltipText() + { + return $this->header_tooltip_text; + } + + /** + * Optional. Column header tooltip text. + * + * Generated from protobuf field string header_tooltip_text = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setHeaderTooltipText($var) + { + GPBUtil::checkString($var, True); + $this->header_tooltip_text = $var; + + return $this; + } + + /** + * Optional. Column cell tooltip text. + * + * Generated from protobuf field string cell_tooltip_text = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCellTooltipText() + { + return $this->cell_tooltip_text; + } + + /** + * Optional. Column cell tooltip text. + * + * Generated from protobuf field string cell_tooltip_text = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCellTooltipText($var) + { + GPBUtil::checkString($var, True); + $this->cell_tooltip_text = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/GoogleMapsConfig.php b/Chronicle/src/V1/DashboardChart/Visualization/GoogleMapsConfig.php new file mode 100644 index 00000000000..338161b61fa --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/GoogleMapsConfig.php @@ -0,0 +1,203 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig + */ +class GoogleMapsConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Data settings for the map. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.DataSettings data_settings = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_settings = null; + /** + * Optional. Plot mode for the map. This is used to determine whether to + * show points, heatmap or both. + * + * Generated from protobuf field .google.cloud.chronicle.v1.PlotMode plot_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $plot_mode = 0; + /** + * Optional. Map position settings for the map. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.MapPosition map_position = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $map_position = null; + /** + * Optional. Point settings for the map. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.PointSettings point_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $point_settings = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\GoogleMapsConfig\DataSettings $data_settings + * Optional. Data settings for the map. + * @type int $plot_mode + * Optional. Plot mode for the map. This is used to determine whether to + * show points, heatmap or both. + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\GoogleMapsConfig\MapPosition $map_position + * Optional. Map position settings for the map. + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\GoogleMapsConfig\PointSettings $point_settings + * Optional. Point settings for the map. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Data settings for the map. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.DataSettings data_settings = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\GoogleMapsConfig\DataSettings|null + */ + public function getDataSettings() + { + return $this->data_settings; + } + + public function hasDataSettings() + { + return isset($this->data_settings); + } + + public function clearDataSettings() + { + unset($this->data_settings); + } + + /** + * Optional. Data settings for the map. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.DataSettings data_settings = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\GoogleMapsConfig\DataSettings $var + * @return $this + */ + public function setDataSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\GoogleMapsConfig\DataSettings::class); + $this->data_settings = $var; + + return $this; + } + + /** + * Optional. Plot mode for the map. This is used to determine whether to + * show points, heatmap or both. + * + * Generated from protobuf field .google.cloud.chronicle.v1.PlotMode plot_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPlotMode() + { + return $this->plot_mode; + } + + /** + * Optional. Plot mode for the map. This is used to determine whether to + * show points, heatmap or both. + * + * Generated from protobuf field .google.cloud.chronicle.v1.PlotMode plot_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPlotMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\PlotMode::class); + $this->plot_mode = $var; + + return $this; + } + + /** + * Optional. Map position settings for the map. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.MapPosition map_position = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\GoogleMapsConfig\MapPosition|null + */ + public function getMapPosition() + { + return $this->map_position; + } + + public function hasMapPosition() + { + return isset($this->map_position); + } + + public function clearMapPosition() + { + unset($this->map_position); + } + + /** + * Optional. Map position settings for the map. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.MapPosition map_position = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\GoogleMapsConfig\MapPosition $var + * @return $this + */ + public function setMapPosition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\GoogleMapsConfig\MapPosition::class); + $this->map_position = $var; + + return $this; + } + + /** + * Optional. Point settings for the map. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.PointSettings point_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\GoogleMapsConfig\PointSettings|null + */ + public function getPointSettings() + { + return $this->point_settings; + } + + public function hasPointSettings() + { + return isset($this->point_settings); + } + + public function clearPointSettings() + { + unset($this->point_settings); + } + + /** + * Optional. Point settings for the map. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.PointSettings point_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\GoogleMapsConfig\PointSettings $var + * @return $this + */ + public function setPointSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\GoogleMapsConfig\PointSettings::class); + $this->point_settings = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/GoogleMapsConfig/DataSettings.php b/Chronicle/src/V1/DashboardChart/Visualization/GoogleMapsConfig/DataSettings.php new file mode 100644 index 00000000000..9266e58d737 --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/GoogleMapsConfig/DataSettings.php @@ -0,0 +1,135 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.DataSettings + */ +class DataSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Latitude column. + * + * Generated from protobuf field string latitude_column = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $latitude_column = ''; + /** + * Optional. Longitude column. + * + * Generated from protobuf field string longitude_column = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $longitude_column = ''; + /** + * Optional. Field to count. + * + * Generated from protobuf field string count_column = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $count_column = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $latitude_column + * Optional. Latitude column. + * @type string $longitude_column + * Optional. Longitude column. + * @type string $count_column + * Optional. Field to count. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Latitude column. + * + * Generated from protobuf field string latitude_column = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLatitudeColumn() + { + return $this->latitude_column; + } + + /** + * Optional. Latitude column. + * + * Generated from protobuf field string latitude_column = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLatitudeColumn($var) + { + GPBUtil::checkString($var, True); + $this->latitude_column = $var; + + return $this; + } + + /** + * Optional. Longitude column. + * + * Generated from protobuf field string longitude_column = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLongitudeColumn() + { + return $this->longitude_column; + } + + /** + * Optional. Longitude column. + * + * Generated from protobuf field string longitude_column = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLongitudeColumn($var) + { + GPBUtil::checkString($var, True); + $this->longitude_column = $var; + + return $this; + } + + /** + * Optional. Field to count. + * + * Generated from protobuf field string count_column = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCountColumn() + { + return $this->count_column; + } + + /** + * Optional. Field to count. + * + * Generated from protobuf field string count_column = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCountColumn($var) + { + GPBUtil::checkString($var, True); + $this->count_column = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/GoogleMapsConfig/MapPosition.php b/Chronicle/src/V1/DashboardChart/Visualization/GoogleMapsConfig/MapPosition.php new file mode 100644 index 00000000000..4fded9790bc --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/GoogleMapsConfig/MapPosition.php @@ -0,0 +1,177 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.MapPosition + */ +class MapPosition extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether to fit the map to the data. + * If true, the map will be resized to fit the data. + * If false, langitude and longitude will be used to set the map size. + * + * Generated from protobuf field bool fit_data = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $fit_data = false; + /** + * Optional. Latitude of the map. + * + * Generated from protobuf field double latitude_value = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $latitude_value = 0.0; + /** + * Optional. Longitude of the map. + * + * Generated from protobuf field double longitude_value = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $longitude_value = 0.0; + /** + * Optional. Scale of the map. + * + * Generated from protobuf field double zoom_scale_value = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $zoom_scale_value = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $fit_data + * Optional. Whether to fit the map to the data. + * If true, the map will be resized to fit the data. + * If false, langitude and longitude will be used to set the map size. + * @type float $latitude_value + * Optional. Latitude of the map. + * @type float $longitude_value + * Optional. Longitude of the map. + * @type float $zoom_scale_value + * Optional. Scale of the map. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether to fit the map to the data. + * If true, the map will be resized to fit the data. + * If false, langitude and longitude will be used to set the map size. + * + * Generated from protobuf field bool fit_data = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getFitData() + { + return $this->fit_data; + } + + /** + * Optional. Whether to fit the map to the data. + * If true, the map will be resized to fit the data. + * If false, langitude and longitude will be used to set the map size. + * + * Generated from protobuf field bool fit_data = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setFitData($var) + { + GPBUtil::checkBool($var); + $this->fit_data = $var; + + return $this; + } + + /** + * Optional. Latitude of the map. + * + * Generated from protobuf field double latitude_value = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getLatitudeValue() + { + return $this->latitude_value; + } + + /** + * Optional. Latitude of the map. + * + * Generated from protobuf field double latitude_value = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setLatitudeValue($var) + { + GPBUtil::checkDouble($var); + $this->latitude_value = $var; + + return $this; + } + + /** + * Optional. Longitude of the map. + * + * Generated from protobuf field double longitude_value = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getLongitudeValue() + { + return $this->longitude_value; + } + + /** + * Optional. Longitude of the map. + * + * Generated from protobuf field double longitude_value = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setLongitudeValue($var) + { + GPBUtil::checkDouble($var); + $this->longitude_value = $var; + + return $this; + } + + /** + * Optional. Scale of the map. + * + * Generated from protobuf field double zoom_scale_value = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getZoomScaleValue() + { + return $this->zoom_scale_value; + } + + /** + * Optional. Scale of the map. + * + * Generated from protobuf field double zoom_scale_value = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setZoomScaleValue($var) + { + GPBUtil::checkDouble($var); + $this->zoom_scale_value = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/GoogleMapsConfig/PointSettings.php b/Chronicle/src/V1/DashboardChart/Visualization/GoogleMapsConfig/PointSettings.php new file mode 100644 index 00000000000..ae9248b5ada --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/GoogleMapsConfig/PointSettings.php @@ -0,0 +1,105 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.PointSettings + */ +class PointSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Point size type for the map. This is used to + * determine the size of the points on the map. + * + * Generated from protobuf field .google.cloud.chronicle.v1.PointSizeType point_size_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $point_size_type = 0; + /** + * Optional. Color for the point on the map. + * + * Generated from protobuf field string color = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $color = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $point_size_type + * Optional. Point size type for the map. This is used to + * determine the size of the points on the map. + * @type string $color + * Optional. Color for the point on the map. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Point size type for the map. This is used to + * determine the size of the points on the map. + * + * Generated from protobuf field .google.cloud.chronicle.v1.PointSizeType point_size_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPointSizeType() + { + return $this->point_size_type; + } + + /** + * Optional. Point size type for the map. This is used to + * determine the size of the points on the map. + * + * Generated from protobuf field .google.cloud.chronicle.v1.PointSizeType point_size_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPointSizeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\PointSizeType::class); + $this->point_size_type = $var; + + return $this; + } + + /** + * Optional. Color for the point on the map. + * + * Generated from protobuf field string color = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getColor() + { + return $this->color; + } + + /** + * Optional. Color for the point on the map. + * + * Generated from protobuf field string color = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setColor($var) + { + GPBUtil::checkString($var, True); + $this->color = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/Legend.php b/Chronicle/src/V1/DashboardChart/Visualization/Legend.php new file mode 100644 index 00000000000..85508b0d805 --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/Legend.php @@ -0,0 +1,328 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.Legend + */ +class Legend extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Generated from protobuf field bool show = 2; + */ + protected $show = false; + /** + * Generated from protobuf field int32 z_level = 3; + */ + protected $z_level = 0; + /** + * Generated from protobuf field int32 z = 4; + */ + protected $z = 0; + /** + * Generated from protobuf field int32 left = 5; + */ + protected $left = 0; + /** + * Generated from protobuf field int32 top = 6; + */ + protected $top = 0; + /** + * Generated from protobuf field int32 right = 7; + */ + protected $right = 0; + /** + * Generated from protobuf field int32 bottom = 8; + */ + protected $bottom = 0; + /** + * Generated from protobuf field .google.cloud.chronicle.v1.LegendOrient legend_orient = 12; + */ + protected $legend_orient = 0; + /** + * Generated from protobuf field .google.cloud.chronicle.v1.LegendAlign legend_align = 13; + */ + protected $legend_align = 0; + /** + * Generated from protobuf field repeated int32 padding = 11; + */ + private $padding; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * @type bool $show + * @type int $z_level + * @type int $z + * @type int $left + * @type int $top + * @type int $right + * @type int $bottom + * @type int $legend_orient + * @type int $legend_align + * @type int[] $padding + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Generated from protobuf field bool show = 2; + * @return bool + */ + public function getShow() + { + return $this->show; + } + + /** + * Generated from protobuf field bool show = 2; + * @param bool $var + * @return $this + */ + public function setShow($var) + { + GPBUtil::checkBool($var); + $this->show = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 z_level = 3; + * @return int + */ + public function getZLevel() + { + return $this->z_level; + } + + /** + * Generated from protobuf field int32 z_level = 3; + * @param int $var + * @return $this + */ + public function setZLevel($var) + { + GPBUtil::checkInt32($var); + $this->z_level = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 z = 4; + * @return int + */ + public function getZ() + { + return $this->z; + } + + /** + * Generated from protobuf field int32 z = 4; + * @param int $var + * @return $this + */ + public function setZ($var) + { + GPBUtil::checkInt32($var); + $this->z = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 left = 5; + * @return int + */ + public function getLeft() + { + return $this->left; + } + + /** + * Generated from protobuf field int32 left = 5; + * @param int $var + * @return $this + */ + public function setLeft($var) + { + GPBUtil::checkInt32($var); + $this->left = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 top = 6; + * @return int + */ + public function getTop() + { + return $this->top; + } + + /** + * Generated from protobuf field int32 top = 6; + * @param int $var + * @return $this + */ + public function setTop($var) + { + GPBUtil::checkInt32($var); + $this->top = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 right = 7; + * @return int + */ + public function getRight() + { + return $this->right; + } + + /** + * Generated from protobuf field int32 right = 7; + * @param int $var + * @return $this + */ + public function setRight($var) + { + GPBUtil::checkInt32($var); + $this->right = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 bottom = 8; + * @return int + */ + public function getBottom() + { + return $this->bottom; + } + + /** + * Generated from protobuf field int32 bottom = 8; + * @param int $var + * @return $this + */ + public function setBottom($var) + { + GPBUtil::checkInt32($var); + $this->bottom = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.LegendOrient legend_orient = 12; + * @return int + */ + public function getLegendOrient() + { + return $this->legend_orient; + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.LegendOrient legend_orient = 12; + * @param int $var + * @return $this + */ + public function setLegendOrient($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\LegendOrient::class); + $this->legend_orient = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.LegendAlign legend_align = 13; + * @return int + */ + public function getLegendAlign() + { + return $this->legend_align; + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.LegendAlign legend_align = 13; + * @param int $var + * @return $this + */ + public function setLegendAlign($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\LegendAlign::class); + $this->legend_align = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated int32 padding = 11; + * @return RepeatedField + */ + public function getPadding() + { + return $this->padding; + } + + /** + * Generated from protobuf field repeated int32 padding = 11; + * @param int[] $var + * @return $this + */ + public function setPadding($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->padding = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/Series.php b/Chronicle/src/V1/DashboardChart/Visualization/Series.php new file mode 100644 index 00000000000..d9b2e06e31b --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/Series.php @@ -0,0 +1,627 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.Series + */ +class Series extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .google.cloud.chronicle.v1.SeriesType series_type = 8; + */ + protected $series_type = 0; + /** + * user specified series label + * + * Generated from protobuf field string series_name = 2; + */ + protected $series_name = ''; + /** + * Generated from protobuf field bool show_symbol = 4; + */ + protected $show_symbol = false; + /** + * Generated from protobuf field bool show_background = 5; + */ + protected $show_background = false; + /** + * Generated from protobuf field string stack = 6; + */ + protected $stack = ''; + /** + * Generated from protobuf field .google.cloud.chronicle.v1.SeriesStackStrategy series_stack_strategy = 9; + */ + protected $series_stack_strategy = 0; + /** + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.Encode encode = 10; + */ + protected $encode = null; + /** + * Generated from protobuf field string label = 11; + */ + protected $label = ''; + /** + * Generated from protobuf field string field = 12; + */ + protected $field = ''; + /** + * Optional. Data label config for a series. + * Displays data vaule in the chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.DataLabel data_label = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_label = null; + /** + * Optional. Used to make a pie chart into a douhnut chart + * + * Generated from protobuf field repeated string radius = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $radius; + /** + * Optional. Custom styling for chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemStyle item_style = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $item_style = null; + /** + * Optional. Series unique value from the query result + * + * Generated from protobuf field string series_unique_value = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $series_unique_value = ''; + /** + * Optional. Custom styling for area chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.AreaStyle area_style = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $area_style = null; + /** + * Optional. Field to be saved for retrieving slice colors for the chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemColors item_colors = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $item_colors = null; + /** + * Optional. Field to be saved for retrieving gauge config for gauge chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeConfig gauge_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $gauge_config = null; + /** + * Optional. Fields to capture trend config for metric charts + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.MetricTrendConfig metric_trend_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $metric_trend_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $series_type + * @type string $series_name + * user specified series label + * @type bool $show_symbol + * @type bool $show_background + * @type string $stack + * @type int $series_stack_strategy + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\Encode $encode + * @type string $label + * @type string $field + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\DataLabel $data_label + * Optional. Data label config for a series. + * Displays data vaule in the chart + * @type string[] $radius + * Optional. Used to make a pie chart into a douhnut chart + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\ItemStyle $item_style + * Optional. Custom styling for chart + * @type string $series_unique_value + * Optional. Series unique value from the query result + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\AreaStyle $area_style + * Optional. Custom styling for area chart + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\ItemColors $item_colors + * Optional. Field to be saved for retrieving slice colors for the chart + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\GaugeConfig $gauge_config + * Optional. Field to be saved for retrieving gauge config for gauge chart + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\MetricTrendConfig $metric_trend_config + * Optional. Fields to capture trend config for metric charts + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.SeriesType series_type = 8; + * @return int + */ + public function getSeriesType() + { + return $this->series_type; + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.SeriesType series_type = 8; + * @param int $var + * @return $this + */ + public function setSeriesType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\SeriesType::class); + $this->series_type = $var; + + return $this; + } + + /** + * user specified series label + * + * Generated from protobuf field string series_name = 2; + * @return string + */ + public function getSeriesName() + { + return $this->series_name; + } + + /** + * user specified series label + * + * Generated from protobuf field string series_name = 2; + * @param string $var + * @return $this + */ + public function setSeriesName($var) + { + GPBUtil::checkString($var, True); + $this->series_name = $var; + + return $this; + } + + /** + * Generated from protobuf field bool show_symbol = 4; + * @return bool + */ + public function getShowSymbol() + { + return $this->show_symbol; + } + + /** + * Generated from protobuf field bool show_symbol = 4; + * @param bool $var + * @return $this + */ + public function setShowSymbol($var) + { + GPBUtil::checkBool($var); + $this->show_symbol = $var; + + return $this; + } + + /** + * Generated from protobuf field bool show_background = 5; + * @return bool + */ + public function getShowBackground() + { + return $this->show_background; + } + + /** + * Generated from protobuf field bool show_background = 5; + * @param bool $var + * @return $this + */ + public function setShowBackground($var) + { + GPBUtil::checkBool($var); + $this->show_background = $var; + + return $this; + } + + /** + * Generated from protobuf field string stack = 6; + * @return string + */ + public function getStack() + { + return $this->stack; + } + + /** + * Generated from protobuf field string stack = 6; + * @param string $var + * @return $this + */ + public function setStack($var) + { + GPBUtil::checkString($var, True); + $this->stack = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.SeriesStackStrategy series_stack_strategy = 9; + * @return int + */ + public function getSeriesStackStrategy() + { + return $this->series_stack_strategy; + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.SeriesStackStrategy series_stack_strategy = 9; + * @param int $var + * @return $this + */ + public function setSeriesStackStrategy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\SeriesStackStrategy::class); + $this->series_stack_strategy = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.Encode encode = 10; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\Encode|null + */ + public function getEncode() + { + return $this->encode; + } + + public function hasEncode() + { + return isset($this->encode); + } + + public function clearEncode() + { + unset($this->encode); + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.Encode encode = 10; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\Encode $var + * @return $this + */ + public function setEncode($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\Encode::class); + $this->encode = $var; + + return $this; + } + + /** + * Generated from protobuf field string label = 11; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Generated from protobuf field string label = 11; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * Generated from protobuf field string field = 12; + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * Generated from protobuf field string field = 12; + * @param string $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkString($var, True); + $this->field = $var; + + return $this; + } + + /** + * Optional. Data label config for a series. + * Displays data vaule in the chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.DataLabel data_label = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\DataLabel|null + */ + public function getDataLabel() + { + return $this->data_label; + } + + public function hasDataLabel() + { + return isset($this->data_label); + } + + public function clearDataLabel() + { + unset($this->data_label); + } + + /** + * Optional. Data label config for a series. + * Displays data vaule in the chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.DataLabel data_label = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\DataLabel $var + * @return $this + */ + public function setDataLabel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\DataLabel::class); + $this->data_label = $var; + + return $this; + } + + /** + * Optional. Used to make a pie chart into a douhnut chart + * + * Generated from protobuf field repeated string radius = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getRadius() + { + return $this->radius; + } + + /** + * Optional. Used to make a pie chart into a douhnut chart + * + * Generated from protobuf field repeated string radius = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setRadius($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->radius = $arr; + + return $this; + } + + /** + * Optional. Custom styling for chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemStyle item_style = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\ItemStyle|null + */ + public function getItemStyle() + { + return $this->item_style; + } + + public function hasItemStyle() + { + return isset($this->item_style); + } + + public function clearItemStyle() + { + unset($this->item_style); + } + + /** + * Optional. Custom styling for chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemStyle item_style = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\ItemStyle $var + * @return $this + */ + public function setItemStyle($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\ItemStyle::class); + $this->item_style = $var; + + return $this; + } + + /** + * Optional. Series unique value from the query result + * + * Generated from protobuf field string series_unique_value = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSeriesUniqueValue() + { + return $this->series_unique_value; + } + + /** + * Optional. Series unique value from the query result + * + * Generated from protobuf field string series_unique_value = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSeriesUniqueValue($var) + { + GPBUtil::checkString($var, True); + $this->series_unique_value = $var; + + return $this; + } + + /** + * Optional. Custom styling for area chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.AreaStyle area_style = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\AreaStyle|null + */ + public function getAreaStyle() + { + return $this->area_style; + } + + public function hasAreaStyle() + { + return isset($this->area_style); + } + + public function clearAreaStyle() + { + unset($this->area_style); + } + + /** + * Optional. Custom styling for area chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.AreaStyle area_style = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\AreaStyle $var + * @return $this + */ + public function setAreaStyle($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\AreaStyle::class); + $this->area_style = $var; + + return $this; + } + + /** + * Optional. Field to be saved for retrieving slice colors for the chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemColors item_colors = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\ItemColors|null + */ + public function getItemColors() + { + return $this->item_colors; + } + + public function hasItemColors() + { + return isset($this->item_colors); + } + + public function clearItemColors() + { + unset($this->item_colors); + } + + /** + * Optional. Field to be saved for retrieving slice colors for the chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemColors item_colors = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\ItemColors $var + * @return $this + */ + public function setItemColors($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\ItemColors::class); + $this->item_colors = $var; + + return $this; + } + + /** + * Optional. Field to be saved for retrieving gauge config for gauge chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeConfig gauge_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\GaugeConfig|null + */ + public function getGaugeConfig() + { + return $this->gauge_config; + } + + public function hasGaugeConfig() + { + return isset($this->gauge_config); + } + + public function clearGaugeConfig() + { + unset($this->gauge_config); + } + + /** + * Optional. Field to be saved for retrieving gauge config for gauge chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeConfig gauge_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\GaugeConfig $var + * @return $this + */ + public function setGaugeConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\GaugeConfig::class); + $this->gauge_config = $var; + + return $this; + } + + /** + * Optional. Fields to capture trend config for metric charts + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.MetricTrendConfig metric_trend_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\MetricTrendConfig|null + */ + public function getMetricTrendConfig() + { + return $this->metric_trend_config; + } + + public function hasMetricTrendConfig() + { + return isset($this->metric_trend_config); + } + + public function clearMetricTrendConfig() + { + unset($this->metric_trend_config); + } + + /** + * Optional. Fields to capture trend config for metric charts + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.MetricTrendConfig metric_trend_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\MetricTrendConfig $var + * @return $this + */ + public function setMetricTrendConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\MetricTrendConfig::class); + $this->metric_trend_config = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/Series/AreaStyle.php b/Chronicle/src/V1/DashboardChart/Visualization/Series/AreaStyle.php new file mode 100644 index 00000000000..05188a1ac7e --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/Series/AreaStyle.php @@ -0,0 +1,271 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.Series.AreaStyle + */ +class AreaStyle extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Used to add color + * + * Generated from protobuf field string color = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $color = ''; + /** + * Optional. Used to add origin + * + * Generated from protobuf field string origin = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $origin = ''; + /** + * Optional. Used to add shadow blur + * + * Generated from protobuf field int32 shadow_blur = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $shadow_blur = 0; + /** + * Optional. Used to add shadow color + * + * Generated from protobuf field string shadow_color = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $shadow_color = ''; + /** + * Optional. Used to add shadow offsetX + * + * Generated from protobuf field int32 shadow_offset_x = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $shadow_offset_x = 0; + /** + * Optional. Used to add shadow offsetY + * + * Generated from protobuf field int32 shadow_offset_y = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $shadow_offset_y = 0; + /** + * Optional. Used to add opacity + * + * Generated from protobuf field int32 opacity = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $opacity = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $color + * Optional. Used to add color + * @type string $origin + * Optional. Used to add origin + * @type int $shadow_blur + * Optional. Used to add shadow blur + * @type string $shadow_color + * Optional. Used to add shadow color + * @type int $shadow_offset_x + * Optional. Used to add shadow offsetX + * @type int $shadow_offset_y + * Optional. Used to add shadow offsetY + * @type int $opacity + * Optional. Used to add opacity + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Used to add color + * + * Generated from protobuf field string color = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getColor() + { + return $this->color; + } + + /** + * Optional. Used to add color + * + * Generated from protobuf field string color = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setColor($var) + { + GPBUtil::checkString($var, True); + $this->color = $var; + + return $this; + } + + /** + * Optional. Used to add origin + * + * Generated from protobuf field string origin = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrigin() + { + return $this->origin; + } + + /** + * Optional. Used to add origin + * + * Generated from protobuf field string origin = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrigin($var) + { + GPBUtil::checkString($var, True); + $this->origin = $var; + + return $this; + } + + /** + * Optional. Used to add shadow blur + * + * Generated from protobuf field int32 shadow_blur = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getShadowBlur() + { + return $this->shadow_blur; + } + + /** + * Optional. Used to add shadow blur + * + * Generated from protobuf field int32 shadow_blur = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setShadowBlur($var) + { + GPBUtil::checkInt32($var); + $this->shadow_blur = $var; + + return $this; + } + + /** + * Optional. Used to add shadow color + * + * Generated from protobuf field string shadow_color = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getShadowColor() + { + return $this->shadow_color; + } + + /** + * Optional. Used to add shadow color + * + * Generated from protobuf field string shadow_color = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setShadowColor($var) + { + GPBUtil::checkString($var, True); + $this->shadow_color = $var; + + return $this; + } + + /** + * Optional. Used to add shadow offsetX + * + * Generated from protobuf field int32 shadow_offset_x = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getShadowOffsetX() + { + return $this->shadow_offset_x; + } + + /** + * Optional. Used to add shadow offsetX + * + * Generated from protobuf field int32 shadow_offset_x = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setShadowOffsetX($var) + { + GPBUtil::checkInt32($var); + $this->shadow_offset_x = $var; + + return $this; + } + + /** + * Optional. Used to add shadow offsetY + * + * Generated from protobuf field int32 shadow_offset_y = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getShadowOffsetY() + { + return $this->shadow_offset_y; + } + + /** + * Optional. Used to add shadow offsetY + * + * Generated from protobuf field int32 shadow_offset_y = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setShadowOffsetY($var) + { + GPBUtil::checkInt32($var); + $this->shadow_offset_y = $var; + + return $this; + } + + /** + * Optional. Used to add opacity + * + * Generated from protobuf field int32 opacity = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getOpacity() + { + return $this->opacity; + } + + /** + * Optional. Used to add opacity + * + * Generated from protobuf field int32 opacity = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setOpacity($var) + { + GPBUtil::checkInt32($var); + $this->opacity = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/Series/ChartSliceColor.php b/Chronicle/src/V1/DashboardChart/Visualization/Series/ChartSliceColor.php new file mode 100644 index 00000000000..f9521afdffd --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/Series/ChartSliceColor.php @@ -0,0 +1,111 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ChartSliceColor + */ +class ChartSliceColor extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Key for the slice + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $key = ''; + /** + * Optional. Value for the slice + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.UserSelectedValues value = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * Optional. Key for the slice + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\UserSelectedValues $value + * Optional. Value for the slice + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Key for the slice + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Optional. Key for the slice + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * Optional. Value for the slice + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.UserSelectedValues value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\UserSelectedValues|null + */ + public function getValue() + { + return $this->value; + } + + public function hasValue() + { + return isset($this->value); + } + + public function clearValue() + { + unset($this->value); + } + + /** + * Optional. Value for the slice + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.UserSelectedValues value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\UserSelectedValues $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\UserSelectedValues::class); + $this->value = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/Series/DataLabel.php b/Chronicle/src/V1/DashboardChart/Visualization/Series/DataLabel.php new file mode 100644 index 00000000000..4cd0d0cc8d3 --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/Series/DataLabel.php @@ -0,0 +1,67 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.Series.DataLabel + */ +class DataLabel extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether to show data label. + * + * Generated from protobuf field bool show = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $show = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $show + * Optional. Whether to show data label. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether to show data label. + * + * Generated from protobuf field bool show = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getShow() + { + return $this->show; + } + + /** + * Optional. Whether to show data label. + * + * Generated from protobuf field bool show = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setShow($var) + { + GPBUtil::checkBool($var); + $this->show = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/Series/Encode.php b/Chronicle/src/V1/DashboardChart/Visualization/Series/Encode.php new file mode 100644 index 00000000000..e34150f8b5a --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/Series/Encode.php @@ -0,0 +1,161 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.Series.Encode + */ +class Encode extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string x = 1; + */ + protected $x = ''; + /** + * Generated from protobuf field string y = 2; + */ + protected $y = ''; + /** + * For some type of series that are not in any coordinate system, like + * 'pie' + * + * Generated from protobuf field string value = 3; + */ + protected $value = ''; + /** + * This is useful in charts like 'pie', where data item name can be + * displayed in legend. + * + * Generated from protobuf field string item_name = 4; + */ + protected $item_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $x + * @type string $y + * @type string $value + * For some type of series that are not in any coordinate system, like + * 'pie' + * @type string $item_name + * This is useful in charts like 'pie', where data item name can be + * displayed in legend. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string x = 1; + * @return string + */ + public function getX() + { + return $this->x; + } + + /** + * Generated from protobuf field string x = 1; + * @param string $var + * @return $this + */ + public function setX($var) + { + GPBUtil::checkString($var, True); + $this->x = $var; + + return $this; + } + + /** + * Generated from protobuf field string y = 2; + * @return string + */ + public function getY() + { + return $this->y; + } + + /** + * Generated from protobuf field string y = 2; + * @param string $var + * @return $this + */ + public function setY($var) + { + GPBUtil::checkString($var, True); + $this->y = $var; + + return $this; + } + + /** + * For some type of series that are not in any coordinate system, like + * 'pie' + * + * Generated from protobuf field string value = 3; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * For some type of series that are not in any coordinate system, like + * 'pie' + * + * Generated from protobuf field string value = 3; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * This is useful in charts like 'pie', where data item name can be + * displayed in legend. + * + * Generated from protobuf field string item_name = 4; + * @return string + */ + public function getItemName() + { + return $this->item_name; + } + + /** + * This is useful in charts like 'pie', where data item name can be + * displayed in legend. + * + * Generated from protobuf field string item_name = 4; + * @param string $var + * @return $this + */ + public function setItemName($var) + { + GPBUtil::checkString($var, True); + $this->item_name = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/Series/GaugeConfig.php b/Chronicle/src/V1/DashboardChart/Visualization/Series/GaugeConfig.php new file mode 100644 index 00000000000..e9d01426c93 --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/Series/GaugeConfig.php @@ -0,0 +1,155 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeConfig + */ +class GaugeConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Base value for gauge chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValue base_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $base_value = null; + /** + * Optional. Limit value for gauge chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValue limit_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $limit_value = null; + /** + * Optional. Threshold values for gauge chart + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValue threshold_values = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $threshold_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\GaugeValue $base_value + * Optional. Base value for gauge chart + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\GaugeValue $limit_value + * Optional. Limit value for gauge chart + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\GaugeValue[] $threshold_values + * Optional. Threshold values for gauge chart + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Base value for gauge chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValue base_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\GaugeValue|null + */ + public function getBaseValue() + { + return $this->base_value; + } + + public function hasBaseValue() + { + return isset($this->base_value); + } + + public function clearBaseValue() + { + unset($this->base_value); + } + + /** + * Optional. Base value for gauge chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValue base_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\GaugeValue $var + * @return $this + */ + public function setBaseValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\GaugeValue::class); + $this->base_value = $var; + + return $this; + } + + /** + * Optional. Limit value for gauge chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValue limit_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\GaugeValue|null + */ + public function getLimitValue() + { + return $this->limit_value; + } + + public function hasLimitValue() + { + return isset($this->limit_value); + } + + public function clearLimitValue() + { + unset($this->limit_value); + } + + /** + * Optional. Limit value for gauge chart + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValue limit_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\GaugeValue $var + * @return $this + */ + public function setLimitValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\GaugeValue::class); + $this->limit_value = $var; + + return $this; + } + + /** + * Optional. Threshold values for gauge chart + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValue threshold_values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\GaugeValue> + */ + public function getThresholdValues() + { + return $this->threshold_values; + } + + /** + * Optional. Threshold values for gauge chart + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValue threshold_values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\GaugeValue[] $var + * @return $this + */ + public function setThresholdValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\GaugeValue::class); + $this->threshold_values = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/Series/GaugeValue.php b/Chronicle/src/V1/DashboardChart/Visualization/Series/GaugeValue.php new file mode 100644 index 00000000000..631073acba0 --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/Series/GaugeValue.php @@ -0,0 +1,101 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValue + */ +class GaugeValue extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Value for gauge chart + * + * Generated from protobuf field int32 value = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $value = 0; + /** + * Optional. Color for gauge chart + * + * Generated from protobuf field string color = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $color = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $value + * Optional. Value for gauge chart + * @type string $color + * Optional. Color for gauge chart + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Value for gauge chart + * + * Generated from protobuf field int32 value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getValue() + { + return $this->value; + } + + /** + * Optional. Value for gauge chart + * + * Generated from protobuf field int32 value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkInt32($var); + $this->value = $var; + + return $this; + } + + /** + * Optional. Color for gauge chart + * + * Generated from protobuf field string color = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getColor() + { + return $this->color; + } + + /** + * Optional. Color for gauge chart + * + * Generated from protobuf field string color = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setColor($var) + { + GPBUtil::checkString($var, True); + $this->color = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/Series/ItemColors.php b/Chronicle/src/V1/DashboardChart/Visualization/Series/ItemColors.php new file mode 100644 index 00000000000..941eaeef6b7 --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/Series/ItemColors.php @@ -0,0 +1,67 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemColors + */ +class ItemColors extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Slice colors array + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ChartSliceColor colors = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $colors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\ChartSliceColor[] $colors + * Optional. Slice colors array + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Slice colors array + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ChartSliceColor colors = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\ChartSliceColor> + */ + public function getColors() + { + return $this->colors; + } + + /** + * Optional. Slice colors array + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ChartSliceColor colors = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\ChartSliceColor[] $var + * @return $this + */ + public function setColors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\Series\ChartSliceColor::class); + $this->colors = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/Series/ItemStyle.php b/Chronicle/src/V1/DashboardChart/Visualization/Series/ItemStyle.php new file mode 100644 index 00000000000..e4b5e356b16 --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/Series/ItemStyle.php @@ -0,0 +1,135 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemStyle + */ +class ItemStyle extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Used to add border width + * + * Generated from protobuf field int32 border_width = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $border_width = 0; + /** + * Optional. Used to add border color + * + * Generated from protobuf field string border_color = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $border_color = ''; + /** + * Optional. Used to add color + * + * Generated from protobuf field string color = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $color = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $border_width + * Optional. Used to add border width + * @type string $border_color + * Optional. Used to add border color + * @type string $color + * Optional. Used to add color + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Used to add border width + * + * Generated from protobuf field int32 border_width = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getBorderWidth() + { + return $this->border_width; + } + + /** + * Optional. Used to add border width + * + * Generated from protobuf field int32 border_width = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setBorderWidth($var) + { + GPBUtil::checkInt32($var); + $this->border_width = $var; + + return $this; + } + + /** + * Optional. Used to add border color + * + * Generated from protobuf field string border_color = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBorderColor() + { + return $this->border_color; + } + + /** + * Optional. Used to add border color + * + * Generated from protobuf field string border_color = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBorderColor($var) + { + GPBUtil::checkString($var, True); + $this->border_color = $var; + + return $this; + } + + /** + * Optional. Used to add color + * + * Generated from protobuf field string color = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getColor() + { + return $this->color; + } + + /** + * Optional. Used to add color + * + * Generated from protobuf field string color = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setColor($var) + { + GPBUtil::checkString($var, True); + $this->color = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/Series/MetricTrendConfig.php b/Chronicle/src/V1/DashboardChart/Visualization/Series/MetricTrendConfig.php new file mode 100644 index 00000000000..648f4161433 --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/Series/MetricTrendConfig.php @@ -0,0 +1,177 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.Series.MetricTrendConfig + */ +class MetricTrendConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Metric chart configuration to display metric trend + * + * Generated from protobuf field .google.cloud.chronicle.v1.MetricFormat metric_format = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $metric_format = 0; + /** + * Optional. Metric chart configuration to toggle the trend value + * display + * + * Generated from protobuf field bool show_metric_trend = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $show_metric_trend = false; + /** + * Optional. Metric chart configuration to display the trend value + * + * Generated from protobuf field .google.cloud.chronicle.v1.MetricDisplayTrend metric_display_trend = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $metric_display_trend = 0; + /** + * Optional. Metric chart configuration to display trend type whether + * regular or inverse + * + * Generated from protobuf field .google.cloud.chronicle.v1.MetricTrendType metric_trend_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $metric_trend_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $metric_format + * Optional. Metric chart configuration to display metric trend + * @type bool $show_metric_trend + * Optional. Metric chart configuration to toggle the trend value + * display + * @type int $metric_display_trend + * Optional. Metric chart configuration to display the trend value + * @type int $metric_trend_type + * Optional. Metric chart configuration to display trend type whether + * regular or inverse + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Metric chart configuration to display metric trend + * + * Generated from protobuf field .google.cloud.chronicle.v1.MetricFormat metric_format = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMetricFormat() + { + return $this->metric_format; + } + + /** + * Optional. Metric chart configuration to display metric trend + * + * Generated from protobuf field .google.cloud.chronicle.v1.MetricFormat metric_format = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMetricFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\MetricFormat::class); + $this->metric_format = $var; + + return $this; + } + + /** + * Optional. Metric chart configuration to toggle the trend value + * display + * + * Generated from protobuf field bool show_metric_trend = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getShowMetricTrend() + { + return $this->show_metric_trend; + } + + /** + * Optional. Metric chart configuration to toggle the trend value + * display + * + * Generated from protobuf field bool show_metric_trend = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setShowMetricTrend($var) + { + GPBUtil::checkBool($var); + $this->show_metric_trend = $var; + + return $this; + } + + /** + * Optional. Metric chart configuration to display the trend value + * + * Generated from protobuf field .google.cloud.chronicle.v1.MetricDisplayTrend metric_display_trend = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMetricDisplayTrend() + { + return $this->metric_display_trend; + } + + /** + * Optional. Metric chart configuration to display the trend value + * + * Generated from protobuf field .google.cloud.chronicle.v1.MetricDisplayTrend metric_display_trend = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMetricDisplayTrend($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\MetricDisplayTrend::class); + $this->metric_display_trend = $var; + + return $this; + } + + /** + * Optional. Metric chart configuration to display trend type whether + * regular or inverse + * + * Generated from protobuf field .google.cloud.chronicle.v1.MetricTrendType metric_trend_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMetricTrendType() + { + return $this->metric_trend_type; + } + + /** + * Optional. Metric chart configuration to display trend type whether + * regular or inverse + * + * Generated from protobuf field .google.cloud.chronicle.v1.MetricTrendType metric_trend_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMetricTrendType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\MetricTrendType::class); + $this->metric_trend_type = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/Series/UserSelectedValues.php b/Chronicle/src/V1/DashboardChart/Visualization/Series/UserSelectedValues.php new file mode 100644 index 00000000000..551b8f138b6 --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/Series/UserSelectedValues.php @@ -0,0 +1,101 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.Series.UserSelectedValues + */ +class UserSelectedValues extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. User specified color of a pie slice + * + * Generated from protobuf field string color = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $color = ''; + /** + * Optional. User specified label for a pie slice + * + * Generated from protobuf field string label = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $label = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $color + * Optional. User specified color of a pie slice + * @type string $label + * Optional. User specified label for a pie slice + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Optional. User specified color of a pie slice + * + * Generated from protobuf field string color = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getColor() + { + return $this->color; + } + + /** + * Optional. User specified color of a pie slice + * + * Generated from protobuf field string color = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setColor($var) + { + GPBUtil::checkString($var, True); + $this->color = $var; + + return $this; + } + + /** + * Optional. User specified label for a pie slice + * + * Generated from protobuf field string label = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Optional. User specified label for a pie slice + * + * Generated from protobuf field string label = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/TableConfig.php b/Chronicle/src/V1/DashboardChart/Visualization/TableConfig.php new file mode 100644 index 00000000000..9b0049bc04e --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/TableConfig.php @@ -0,0 +1,135 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.TableConfig + */ +class TableConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether to show the table. + * + * Generated from protobuf field bool enable_text_wrap = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_text_wrap = false; + /** + * Optional. Column render type settings. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnRenderTypeSettings column_render_type_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $column_render_type_settings; + /** + * Optional. Settings for tooltip for column header and cell. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnTooltipSettings column_tooltip_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $column_tooltip_settings; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_text_wrap + * Optional. Whether to show the table. + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\ColumnRenderTypeSettings[] $column_render_type_settings + * Optional. Column render type settings. + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\ColumnTooltipSettings[] $column_tooltip_settings + * Optional. Settings for tooltip for column header and cell. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether to show the table. + * + * Generated from protobuf field bool enable_text_wrap = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableTextWrap() + { + return $this->enable_text_wrap; + } + + /** + * Optional. Whether to show the table. + * + * Generated from protobuf field bool enable_text_wrap = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableTextWrap($var) + { + GPBUtil::checkBool($var); + $this->enable_text_wrap = $var; + + return $this; + } + + /** + * Optional. Column render type settings. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnRenderTypeSettings column_render_type_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DashboardChart\Visualization\ColumnRenderTypeSettings> + */ + public function getColumnRenderTypeSettings() + { + return $this->column_render_type_settings; + } + + /** + * Optional. Column render type settings. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnRenderTypeSettings column_render_type_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\ColumnRenderTypeSettings[] $var + * @return $this + */ + public function setColumnRenderTypeSettings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\ColumnRenderTypeSettings::class); + $this->column_render_type_settings = $arr; + + return $this; + } + + /** + * Optional. Settings for tooltip for column header and cell. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnTooltipSettings column_tooltip_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DashboardChart\Visualization\ColumnTooltipSettings> + */ + public function getColumnTooltipSettings() + { + return $this->column_tooltip_settings; + } + + /** + * Optional. Settings for tooltip for column header and cell. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnTooltipSettings column_tooltip_settings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\ColumnTooltipSettings[] $var + * @return $this + */ + public function setColumnTooltipSettings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\ColumnTooltipSettings::class); + $this->column_tooltip_settings = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/Tooltip.php b/Chronicle/src/V1/DashboardChart/Visualization/Tooltip.php new file mode 100644 index 00000000000..cf2d0750d0b --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/Tooltip.php @@ -0,0 +1,85 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.Tooltip + */ +class Tooltip extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bool show = 1; + */ + protected $show = false; + /** + * Generated from protobuf field .google.cloud.chronicle.v1.ToolTipTrigger tooltip_trigger = 3; + */ + protected $tooltip_trigger = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $show + * @type int $tooltip_trigger + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bool show = 1; + * @return bool + */ + public function getShow() + { + return $this->show; + } + + /** + * Generated from protobuf field bool show = 1; + * @param bool $var + * @return $this + */ + public function setShow($var) + { + GPBUtil::checkBool($var); + $this->show = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.ToolTipTrigger tooltip_trigger = 3; + * @return int + */ + public function getTooltipTrigger() + { + return $this->tooltip_trigger; + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.ToolTipTrigger tooltip_trigger = 3; + * @param int $var + * @return $this + */ + public function setTooltipTrigger($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\ToolTipTrigger::class); + $this->tooltip_trigger = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/VisualMap.php b/Chronicle/src/V1/DashboardChart/Visualization/VisualMap.php new file mode 100644 index 00000000000..4fbfc4b3b88 --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/VisualMap.php @@ -0,0 +1,106 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap + */ +class VisualMap extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Contains one of the valid visual map types such as + * 'continuous' or 'piecewise'. + * + * Generated from protobuf field .google.cloud.chronicle.v1.VisualMapType visual_map_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $visual_map_type = 0; + /** + * Optional. Pieces of the visual map. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap.VisualMapPiece pieces = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $pieces; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $visual_map_type + * Optional. Contains one of the valid visual map types such as + * 'continuous' or 'piecewise'. + * @type \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\VisualMap\VisualMapPiece[] $pieces + * Optional. Pieces of the visual map. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Contains one of the valid visual map types such as + * 'continuous' or 'piecewise'. + * + * Generated from protobuf field .google.cloud.chronicle.v1.VisualMapType visual_map_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getVisualMapType() + { + return $this->visual_map_type; + } + + /** + * Optional. Contains one of the valid visual map types such as + * 'continuous' or 'piecewise'. + * + * Generated from protobuf field .google.cloud.chronicle.v1.VisualMapType visual_map_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setVisualMapType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\VisualMapType::class); + $this->visual_map_type = $var; + + return $this; + } + + /** + * Optional. Pieces of the visual map. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap.VisualMapPiece pieces = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DashboardChart\Visualization\VisualMap\VisualMapPiece> + */ + public function getPieces() + { + return $this->pieces; + } + + /** + * Optional. Pieces of the visual map. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap.VisualMapPiece pieces = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\VisualMap\VisualMapPiece[] $var + * @return $this + */ + public function setPieces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DashboardChart\Visualization\VisualMap\VisualMapPiece::class); + $this->pieces = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardChart/Visualization/VisualMap/VisualMapPiece.php b/Chronicle/src/V1/DashboardChart/Visualization/VisualMap/VisualMapPiece.php new file mode 100644 index 00000000000..827bebc3d79 --- /dev/null +++ b/Chronicle/src/V1/DashboardChart/Visualization/VisualMap/VisualMapPiece.php @@ -0,0 +1,194 @@ +google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap.VisualMapPiece + */ +class VisualMapPiece extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Minimum value for the piece. + * + * Generated from protobuf field optional int64 min = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $min = null; + /** + * Optional. Minimum value for the piece. + * + * Generated from protobuf field optional int64 max = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max = null; + /** + * Optional. Color to render the piece in when the value is between min + * and max. + * + * Generated from protobuf field string color = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $color = ''; + /** + * Optional. Label used in visual map controller. + * + * Generated from protobuf field string label = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $label = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $min + * Optional. Minimum value for the piece. + * @type int|string $max + * Optional. Minimum value for the piece. + * @type string $color + * Optional. Color to render the piece in when the value is between min + * and max. + * @type string $label + * Optional. Label used in visual map controller. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Minimum value for the piece. + * + * Generated from protobuf field optional int64 min = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMin() + { + return isset($this->min) ? $this->min : 0; + } + + public function hasMin() + { + return isset($this->min); + } + + public function clearMin() + { + unset($this->min); + } + + /** + * Optional. Minimum value for the piece. + * + * Generated from protobuf field optional int64 min = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMin($var) + { + GPBUtil::checkInt64($var); + $this->min = $var; + + return $this; + } + + /** + * Optional. Minimum value for the piece. + * + * Generated from protobuf field optional int64 max = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMax() + { + return isset($this->max) ? $this->max : 0; + } + + public function hasMax() + { + return isset($this->max); + } + + public function clearMax() + { + unset($this->max); + } + + /** + * Optional. Minimum value for the piece. + * + * Generated from protobuf field optional int64 max = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMax($var) + { + GPBUtil::checkInt64($var); + $this->max = $var; + + return $this; + } + + /** + * Optional. Color to render the piece in when the value is between min + * and max. + * + * Generated from protobuf field string color = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getColor() + { + return $this->color; + } + + /** + * Optional. Color to render the piece in when the value is between min + * and max. + * + * Generated from protobuf field string color = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setColor($var) + { + GPBUtil::checkString($var, True); + $this->color = $var; + + return $this; + } + + /** + * Optional. Label used in visual map controller. + * + * Generated from protobuf field string label = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Optional. Label used in visual map controller. + * + * Generated from protobuf field string label = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardDefinition.php b/Chronicle/src/V1/DashboardDefinition.php new file mode 100644 index 00000000000..30d2d7f300c --- /dev/null +++ b/Chronicle/src/V1/DashboardDefinition.php @@ -0,0 +1,136 @@ +google.cloud.chronicle.v1.DashboardDefinition + */ +class DashboardDefinition extends \Google\Protobuf\Internal\Message +{ + /** + * Filters for the dashboard. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardFilter filters = 1; + */ + private $filters; + /** + * Fingerprint of the dashboard definition. + * + * Generated from protobuf field string fingerprint = 2; + */ + protected $fingerprint = ''; + /** + * Charts in the dashboard. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardDefinition.ChartConfig charts = 4; + */ + private $charts; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\DashboardFilter[] $filters + * Filters for the dashboard. + * @type string $fingerprint + * Fingerprint of the dashboard definition. + * @type \Google\Cloud\Chronicle\V1\DashboardDefinition\ChartConfig[] $charts + * Charts in the dashboard. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Filters for the dashboard. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardFilter filters = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DashboardFilter> + */ + public function getFilters() + { + return $this->filters; + } + + /** + * Filters for the dashboard. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardFilter filters = 1; + * @param \Google\Cloud\Chronicle\V1\DashboardFilter[] $var + * @return $this + */ + public function setFilters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DashboardFilter::class); + $this->filters = $arr; + + return $this; + } + + /** + * Fingerprint of the dashboard definition. + * + * Generated from protobuf field string fingerprint = 2; + * @return string + */ + public function getFingerprint() + { + return $this->fingerprint; + } + + /** + * Fingerprint of the dashboard definition. + * + * Generated from protobuf field string fingerprint = 2; + * @param string $var + * @return $this + */ + public function setFingerprint($var) + { + GPBUtil::checkString($var, True); + $this->fingerprint = $var; + + return $this; + } + + /** + * Charts in the dashboard. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardDefinition.ChartConfig charts = 4; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DashboardDefinition\ChartConfig> + */ + public function getCharts() + { + return $this->charts; + } + + /** + * Charts in the dashboard. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardDefinition.ChartConfig charts = 4; + * @param \Google\Cloud\Chronicle\V1\DashboardDefinition\ChartConfig[] $var + * @return $this + */ + public function setCharts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DashboardDefinition\ChartConfig::class); + $this->charts = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardDefinition/ChartConfig.php b/Chronicle/src/V1/DashboardDefinition/ChartConfig.php new file mode 100644 index 00000000000..6355197f969 --- /dev/null +++ b/Chronicle/src/V1/DashboardDefinition/ChartConfig.php @@ -0,0 +1,131 @@ +google.cloud.chronicle.v1.DashboardDefinition.ChartConfig + */ +class ChartConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string dashboard_chart = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $dashboard_chart = ''; + /** + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardDefinition.ChartConfig.ChartLayout chart_layout = 2; + */ + protected $chart_layout = null; + /** + * Dashboard filters applied to the chart. + * + * Generated from protobuf field repeated string filters_ids = 4; + */ + private $filters_ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dashboard_chart + * @type \Google\Cloud\Chronicle\V1\DashboardDefinition\ChartConfig\ChartLayout $chart_layout + * @type string[] $filters_ids + * Dashboard filters applied to the chart. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string dashboard_chart = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getDashboardChart() + { + return $this->dashboard_chart; + } + + /** + * Generated from protobuf field string dashboard_chart = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDashboardChart($var) + { + GPBUtil::checkString($var, True); + $this->dashboard_chart = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardDefinition.ChartConfig.ChartLayout chart_layout = 2; + * @return \Google\Cloud\Chronicle\V1\DashboardDefinition\ChartConfig\ChartLayout|null + */ + public function getChartLayout() + { + return $this->chart_layout; + } + + public function hasChartLayout() + { + return isset($this->chart_layout); + } + + public function clearChartLayout() + { + unset($this->chart_layout); + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardDefinition.ChartConfig.ChartLayout chart_layout = 2; + * @param \Google\Cloud\Chronicle\V1\DashboardDefinition\ChartConfig\ChartLayout $var + * @return $this + */ + public function setChartLayout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardDefinition\ChartConfig\ChartLayout::class); + $this->chart_layout = $var; + + return $this; + } + + /** + * Dashboard filters applied to the chart. + * + * Generated from protobuf field repeated string filters_ids = 4; + * @return RepeatedField + */ + public function getFiltersIds() + { + return $this->filters_ids; + } + + /** + * Dashboard filters applied to the chart. + * + * Generated from protobuf field repeated string filters_ids = 4; + * @param string[] $var + * @return $this + */ + public function setFiltersIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->filters_ids = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardDefinition/ChartConfig/ChartLayout.php b/Chronicle/src/V1/DashboardDefinition/ChartConfig/ChartLayout.php new file mode 100644 index 00000000000..09b82904ab9 --- /dev/null +++ b/Chronicle/src/V1/DashboardDefinition/ChartConfig/ChartLayout.php @@ -0,0 +1,161 @@ +google.cloud.chronicle.v1.DashboardDefinition.ChartConfig.ChartLayout + */ +class ChartLayout extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field optional int32 start_x = 9; + */ + protected $start_x = null; + /** + * Generated from protobuf field int32 span_x = 10; + */ + protected $span_x = 0; + /** + * Generated from protobuf field optional int32 start_y = 11; + */ + protected $start_y = null; + /** + * Generated from protobuf field int32 span_y = 12; + */ + protected $span_y = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $start_x + * @type int $span_x + * @type int $start_y + * @type int $span_y + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field optional int32 start_x = 9; + * @return int + */ + public function getStartX() + { + return isset($this->start_x) ? $this->start_x : 0; + } + + public function hasStartX() + { + return isset($this->start_x); + } + + public function clearStartX() + { + unset($this->start_x); + } + + /** + * Generated from protobuf field optional int32 start_x = 9; + * @param int $var + * @return $this + */ + public function setStartX($var) + { + GPBUtil::checkInt32($var); + $this->start_x = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 span_x = 10; + * @return int + */ + public function getSpanX() + { + return $this->span_x; + } + + /** + * Generated from protobuf field int32 span_x = 10; + * @param int $var + * @return $this + */ + public function setSpanX($var) + { + GPBUtil::checkInt32($var); + $this->span_x = $var; + + return $this; + } + + /** + * Generated from protobuf field optional int32 start_y = 11; + * @return int + */ + public function getStartY() + { + return isset($this->start_y) ? $this->start_y : 0; + } + + public function hasStartY() + { + return isset($this->start_y); + } + + public function clearStartY() + { + unset($this->start_y); + } + + /** + * Generated from protobuf field optional int32 start_y = 11; + * @param int $var + * @return $this + */ + public function setStartY($var) + { + GPBUtil::checkInt32($var); + $this->start_y = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 span_y = 12; + * @return int + */ + public function getSpanY() + { + return $this->span_y; + } + + /** + * Generated from protobuf field int32 span_y = 12; + * @param int $var + * @return $this + */ + public function setSpanY($var) + { + GPBUtil::checkInt32($var); + $this->span_y = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardFilter.php b/Chronicle/src/V1/DashboardFilter.php new file mode 100644 index 00000000000..79c685090fe --- /dev/null +++ b/Chronicle/src/V1/DashboardFilter.php @@ -0,0 +1,410 @@ +google.cloud.chronicle.v1.DashboardFilter + */ +class DashboardFilter extends \Google\Protobuf\Internal\Message +{ + /** + * ID of the filter. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Datasource the filter is applicable for. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSource data_source = 2; + */ + protected $data_source = 0; + /** + * Filter field path. + * + * Generated from protobuf field string field_path = 3; + */ + protected $field_path = ''; + /** + * Operator and values. Can include multiple modifiers. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.FilterOperatorAndValues filter_operator_and_field_values = 4; + */ + private $filter_operator_and_field_values; + /** + * Display name of the filter. + * + * Generated from protobuf field string display_name = 5; + */ + protected $display_name = ''; + /** + * Chart IDs the filter is applicable for. + * + * Generated from protobuf field repeated string chart_ids = 6; + */ + private $chart_ids; + /** + * Optional. Whether the filter is a standard time range filter, + * meaning that it has to be used as the query time range, + * and not as a predicate in the query. + * A chart can have at most one standard time range filter applied. + * + * Generated from protobuf field bool is_standard_time_range_filter = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $is_standard_time_range_filter = false; + /** + * Optional. Whether this filter is required to be populated by the + * dashboard consumer prior to the dashboard loading. + * + * Generated from protobuf field bool is_mandatory = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $is_mandatory = false; + /** + * Optional. Whether this standard time range filter is enabled. + * + * Generated from protobuf field optional bool is_standard_time_range_filter_enabled = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $is_standard_time_range_filter_enabled = null; + /** + * Optional. Advanced filter configuration for the filter widget. + * + * Generated from protobuf field .google.cloud.chronicle.v1.AdvancedFilterConfig advanced_filter_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $advanced_filter_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * ID of the filter. + * @type int $data_source + * Datasource the filter is applicable for. + * @type string $field_path + * Filter field path. + * @type \Google\Cloud\Chronicle\V1\FilterOperatorAndValues[] $filter_operator_and_field_values + * Operator and values. Can include multiple modifiers. + * @type string $display_name + * Display name of the filter. + * @type string[] $chart_ids + * Chart IDs the filter is applicable for. + * @type bool $is_standard_time_range_filter + * Optional. Whether the filter is a standard time range filter, + * meaning that it has to be used as the query time range, + * and not as a predicate in the query. + * A chart can have at most one standard time range filter applied. + * @type bool $is_mandatory + * Optional. Whether this filter is required to be populated by the + * dashboard consumer prior to the dashboard loading. + * @type bool $is_standard_time_range_filter_enabled + * Optional. Whether this standard time range filter is enabled. + * @type \Google\Cloud\Chronicle\V1\AdvancedFilterConfig $advanced_filter_config + * Optional. Advanced filter configuration for the filter widget. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * ID of the filter. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * ID of the filter. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Datasource the filter is applicable for. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSource data_source = 2; + * @return int + */ + public function getDataSource() + { + return $this->data_source; + } + + /** + * Datasource the filter is applicable for. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DataSource data_source = 2; + * @param int $var + * @return $this + */ + public function setDataSource($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\DataSource::class); + $this->data_source = $var; + + return $this; + } + + /** + * Filter field path. + * + * Generated from protobuf field string field_path = 3; + * @return string + */ + public function getFieldPath() + { + return $this->field_path; + } + + /** + * Filter field path. + * + * Generated from protobuf field string field_path = 3; + * @param string $var + * @return $this + */ + public function setFieldPath($var) + { + GPBUtil::checkString($var, True); + $this->field_path = $var; + + return $this; + } + + /** + * Operator and values. Can include multiple modifiers. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.FilterOperatorAndValues filter_operator_and_field_values = 4; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\FilterOperatorAndValues> + */ + public function getFilterOperatorAndFieldValues() + { + return $this->filter_operator_and_field_values; + } + + /** + * Operator and values. Can include multiple modifiers. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.FilterOperatorAndValues filter_operator_and_field_values = 4; + * @param \Google\Cloud\Chronicle\V1\FilterOperatorAndValues[] $var + * @return $this + */ + public function setFilterOperatorAndFieldValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\FilterOperatorAndValues::class); + $this->filter_operator_and_field_values = $arr; + + return $this; + } + + /** + * Display name of the filter. + * + * Generated from protobuf field string display_name = 5; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Display name of the filter. + * + * Generated from protobuf field string display_name = 5; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Chart IDs the filter is applicable for. + * + * Generated from protobuf field repeated string chart_ids = 6; + * @return RepeatedField + */ + public function getChartIds() + { + return $this->chart_ids; + } + + /** + * Chart IDs the filter is applicable for. + * + * Generated from protobuf field repeated string chart_ids = 6; + * @param string[] $var + * @return $this + */ + public function setChartIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->chart_ids = $arr; + + return $this; + } + + /** + * Optional. Whether the filter is a standard time range filter, + * meaning that it has to be used as the query time range, + * and not as a predicate in the query. + * A chart can have at most one standard time range filter applied. + * + * Generated from protobuf field bool is_standard_time_range_filter = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIsStandardTimeRangeFilter() + { + return $this->is_standard_time_range_filter; + } + + /** + * Optional. Whether the filter is a standard time range filter, + * meaning that it has to be used as the query time range, + * and not as a predicate in the query. + * A chart can have at most one standard time range filter applied. + * + * Generated from protobuf field bool is_standard_time_range_filter = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIsStandardTimeRangeFilter($var) + { + GPBUtil::checkBool($var); + $this->is_standard_time_range_filter = $var; + + return $this; + } + + /** + * Optional. Whether this filter is required to be populated by the + * dashboard consumer prior to the dashboard loading. + * + * Generated from protobuf field bool is_mandatory = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIsMandatory() + { + return $this->is_mandatory; + } + + /** + * Optional. Whether this filter is required to be populated by the + * dashboard consumer prior to the dashboard loading. + * + * Generated from protobuf field bool is_mandatory = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIsMandatory($var) + { + GPBUtil::checkBool($var); + $this->is_mandatory = $var; + + return $this; + } + + /** + * Optional. Whether this standard time range filter is enabled. + * + * Generated from protobuf field optional bool is_standard_time_range_filter_enabled = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIsStandardTimeRangeFilterEnabled() + { + return isset($this->is_standard_time_range_filter_enabled) ? $this->is_standard_time_range_filter_enabled : false; + } + + public function hasIsStandardTimeRangeFilterEnabled() + { + return isset($this->is_standard_time_range_filter_enabled); + } + + public function clearIsStandardTimeRangeFilterEnabled() + { + unset($this->is_standard_time_range_filter_enabled); + } + + /** + * Optional. Whether this standard time range filter is enabled. + * + * Generated from protobuf field optional bool is_standard_time_range_filter_enabled = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIsStandardTimeRangeFilterEnabled($var) + { + GPBUtil::checkBool($var); + $this->is_standard_time_range_filter_enabled = $var; + + return $this; + } + + /** + * Optional. Advanced filter configuration for the filter widget. + * + * Generated from protobuf field .google.cloud.chronicle.v1.AdvancedFilterConfig advanced_filter_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\AdvancedFilterConfig|null + */ + public function getAdvancedFilterConfig() + { + return $this->advanced_filter_config; + } + + public function hasAdvancedFilterConfig() + { + return isset($this->advanced_filter_config); + } + + public function clearAdvancedFilterConfig() + { + unset($this->advanced_filter_config); + } + + /** + * Optional. Advanced filter configuration for the filter widget. + * + * Generated from protobuf field .google.cloud.chronicle.v1.AdvancedFilterConfig advanced_filter_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\AdvancedFilterConfig $var + * @return $this + */ + public function setAdvancedFilterConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\AdvancedFilterConfig::class); + $this->advanced_filter_config = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardQuery.php b/Chronicle/src/V1/DashboardQuery.php new file mode 100644 index 00000000000..72d8951c72d --- /dev/null +++ b/Chronicle/src/V1/DashboardQuery.php @@ -0,0 +1,221 @@ +google.cloud.chronicle.v1.DashboardQuery + */ +class DashboardQuery extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Name of the dashboardQuery. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Search query string. + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = ''; + /** + * Required. Inputs to the query. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardQuery.Input input = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input = null; + /** + * Output only. DashboardChart this query belongs to. + * + * Generated from protobuf field string dashboard_chart = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $dashboard_chart = ''; + /** + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Name of the dashboardQuery. + * @type string $query + * Required. Search query string. + * @type \Google\Cloud\Chronicle\V1\DashboardQuery\Input $input + * Required. Inputs to the query. + * @type string $dashboard_chart + * Output only. DashboardChart this query belongs to. + * @type string $etag + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Name of the dashboardQuery. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Name of the dashboardQuery. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Search query string. + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Required. Search query string. + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * Required. Inputs to the query. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardQuery.Input input = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\DashboardQuery\Input|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Required. Inputs to the query. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardQuery.Input input = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\DashboardQuery\Input $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardQuery\Input::class); + $this->input = $var; + + return $this; + } + + /** + * Output only. DashboardChart this query belongs to. + * + * Generated from protobuf field string dashboard_chart = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getDashboardChart() + { + return $this->dashboard_chart; + } + + /** + * Output only. DashboardChart this query belongs to. + * + * Generated from protobuf field string dashboard_chart = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDashboardChart($var) + { + GPBUtil::checkString($var, True); + $this->dashboard_chart = $var; + + return $this; + } + + /** + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardQuery/Input.php b/Chronicle/src/V1/DashboardQuery/Input.php new file mode 100644 index 00000000000..0d33588d5be --- /dev/null +++ b/Chronicle/src/V1/DashboardQuery/Input.php @@ -0,0 +1,108 @@ +google.cloud.chronicle.v1.DashboardQuery.Input + */ +class Input extends \Google\Protobuf\Internal\Message +{ + protected $time_input; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\Interval $time_window + * time range to fetch the data for. + * @type \Google\Cloud\Chronicle\V1\DashboardQuery\Input\RelativeTime $relative_time + * time range for last x units. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * time range to fetch the data for. + * + * Generated from protobuf field .google.type.Interval time_window = 1; + * @return \Google\Type\Interval|null + */ + public function getTimeWindow() + { + return $this->readOneof(1); + } + + public function hasTimeWindow() + { + return $this->hasOneof(1); + } + + /** + * time range to fetch the data for. + * + * Generated from protobuf field .google.type.Interval time_window = 1; + * @param \Google\Type\Interval $var + * @return $this + */ + public function setTimeWindow($var) + { + GPBUtil::checkMessage($var, \Google\Type\Interval::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * time range for last x units. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardQuery.Input.RelativeTime relative_time = 3; + * @return \Google\Cloud\Chronicle\V1\DashboardQuery\Input\RelativeTime|null + */ + public function getRelativeTime() + { + return $this->readOneof(3); + } + + public function hasRelativeTime() + { + return $this->hasOneof(3); + } + + /** + * time range for last x units. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardQuery.Input.RelativeTime relative_time = 3; + * @param \Google\Cloud\Chronicle\V1\DashboardQuery\Input\RelativeTime $var + * @return $this + */ + public function setRelativeTime($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardQuery\Input\RelativeTime::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getTimeInput() + { + return $this->whichOneof("time_input"); + } + +} + diff --git a/Chronicle/src/V1/DashboardQuery/Input/RelativeTime.php b/Chronicle/src/V1/DashboardQuery/Input/RelativeTime.php new file mode 100644 index 00000000000..594b70b0840 --- /dev/null +++ b/Chronicle/src/V1/DashboardQuery/Input/RelativeTime.php @@ -0,0 +1,87 @@ +google.cloud.chronicle.v1.DashboardQuery.Input.RelativeTime + */ +class RelativeTime extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .google.cloud.chronicle.v1.TimeUnit time_unit = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $time_unit = 0; + /** + * Generated from protobuf field int64 start_time_val = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $start_time_val = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $time_unit + * @type int|string $start_time_val + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.TimeUnit time_unit = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getTimeUnit() + { + return $this->time_unit; + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.TimeUnit time_unit = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setTimeUnit($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\TimeUnit::class); + $this->time_unit = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 start_time_val = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int|string + */ + public function getStartTimeVal() + { + return $this->start_time_val; + } + + /** + * Generated from protobuf field int64 start_time_val = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int|string $var + * @return $this + */ + public function setStartTimeVal($var) + { + GPBUtil::checkInt64($var); + $this->start_time_val = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DashboardType.php b/Chronicle/src/V1/DashboardType.php new file mode 100644 index 00000000000..e20f164a073 --- /dev/null +++ b/Chronicle/src/V1/DashboardType.php @@ -0,0 +1,86 @@ +google.cloud.chronicle.v1.DashboardType + */ +class DashboardType +{ + /** + * Default unspecified. + * + * Generated from protobuf enum DASHBOARD_TYPE_UNSPECIFIED = 0; + */ + const DASHBOARD_TYPE_UNSPECIFIED = 0; + /** + * Out of the box curated dashboards provided by Chronicle. + * + * Generated from protobuf enum CURATED = 1; + */ + const CURATED = 1; + /** + * Private dashboards created by users/customers. + * + * Generated from protobuf enum PRIVATE = 2; + */ + const PBPRIVATE = 2; + /** + * Public dashboards created by users/customers. + * + * Generated from protobuf enum PUBLIC = 3; + */ + const PBPUBLIC = 3; + /** + * Custom dashboards + * + * Generated from protobuf enum CUSTOM = 4; + */ + const CUSTOM = 4; + /** + * Marketplace dashboards + * + * Generated from protobuf enum MARKETPLACE = 5; + */ + const MARKETPLACE = 5; + + private static $valueToName = [ + self::DASHBOARD_TYPE_UNSPECIFIED => 'DASHBOARD_TYPE_UNSPECIFIED', + self::CURATED => 'CURATED', + self::PBPRIVATE => 'PRIVATE', + self::PBPUBLIC => 'PUBLIC', + self::CUSTOM => 'CUSTOM', + self::MARKETPLACE => 'MARKETPLACE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/DashboardUserData.php b/Chronicle/src/V1/DashboardUserData.php new file mode 100644 index 00000000000..5ce9afb7d05 --- /dev/null +++ b/Chronicle/src/V1/DashboardUserData.php @@ -0,0 +1,111 @@ +google.cloud.chronicle.v1.DashboardUserData + */ +class DashboardUserData extends \Google\Protobuf\Internal\Message +{ + /** + * time when this dashboard is last viewed + * + * Generated from protobuf field .google.protobuf.Timestamp last_viewed_time = 1; + */ + protected $last_viewed_time = null; + /** + * is dashboard pinned by user + * + * Generated from protobuf field bool is_pinned = 2; + */ + protected $is_pinned = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $last_viewed_time + * time when this dashboard is last viewed + * @type bool $is_pinned + * is dashboard pinned by user + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * time when this dashboard is last viewed + * + * Generated from protobuf field .google.protobuf.Timestamp last_viewed_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastViewedTime() + { + return $this->last_viewed_time; + } + + public function hasLastViewedTime() + { + return isset($this->last_viewed_time); + } + + public function clearLastViewedTime() + { + unset($this->last_viewed_time); + } + + /** + * time when this dashboard is last viewed + * + * Generated from protobuf field .google.protobuf.Timestamp last_viewed_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastViewedTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_viewed_time = $var; + + return $this; + } + + /** + * is dashboard pinned by user + * + * Generated from protobuf field bool is_pinned = 2; + * @return bool + */ + public function getIsPinned() + { + return $this->is_pinned; + } + + /** + * is dashboard pinned by user + * + * Generated from protobuf field bool is_pinned = 2; + * @param bool $var + * @return $this + */ + public function setIsPinned($var) + { + GPBUtil::checkBool($var); + $this->is_pinned = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DataSource.php b/Chronicle/src/V1/DataSource.php new file mode 100644 index 00000000000..afe99eb7727 --- /dev/null +++ b/Chronicle/src/V1/DataSource.php @@ -0,0 +1,143 @@ +google.cloud.chronicle.v1.DataSource + */ +class DataSource +{ + /** + * Generated from protobuf enum DATA_SOURCE_UNSPECIFIED = 0; + */ + const DATA_SOURCE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum UDM = 1; + */ + const UDM = 1; + /** + * Generated from protobuf enum ENTITY = 2; + */ + const ENTITY = 2; + /** + * Generated from protobuf enum INGESTION_METRICS = 3; + */ + const INGESTION_METRICS = 3; + /** + * RULE_DETECTIONS is used for detections datasource. + * + * Generated from protobuf enum RULE_DETECTIONS = 4; + */ + const RULE_DETECTIONS = 4; + /** + * RULESETS is used for ruleset with detections datasource. + * + * Generated from protobuf enum RULESETS = 5; + */ + const RULESETS = 5; + /** + * GLOBAL is used for standard time range filter. + * + * Generated from protobuf enum GLOBAL = 6; + */ + const PBGLOBAL = 6; + /** + * IOC_MATCHES is used for ioc_matches datasource. + * + * Generated from protobuf enum IOC_MATCHES = 7; + */ + const IOC_MATCHES = 7; + /** + * RULES is used for rules datasource. + * + * Generated from protobuf enum RULES = 8; + */ + const RULES = 8; + /** + * SOAR Cases - identified as `case`. + * + * Generated from protobuf enum SOAR_CASES = 9; + */ + const SOAR_CASES = 9; + /** + * SOAR Playbooks - identified as `playbook`. + * + * Generated from protobuf enum SOAR_PLAYBOOKS = 10; + */ + const SOAR_PLAYBOOKS = 10; + /** + * SOAR Case History - identified as `case_history`. + * + * Generated from protobuf enum SOAR_CASE_HISTORY = 11; + */ + const SOAR_CASE_HISTORY = 11; + /** + * DATA_TABLE is used for data tables source. + * + * Generated from protobuf enum DATA_TABLE = 12; + */ + const DATA_TABLE = 12; + /** + * INVESTIGATION is used as the data source for triage agent investigations. + * Identified as `gemini_investigation`. + * + * Generated from protobuf enum INVESTIGATION = 13; + */ + const INVESTIGATION = 13; + /** + * INVESTIGATION_FEEDBACK is used as the data source for user feedback on + * triage agent investigations. Identified as `gemini_investigation_feedback`. + * + * Generated from protobuf enum INVESTIGATION_FEEDBACK = 14; + */ + const INVESTIGATION_FEEDBACK = 14; + + private static $valueToName = [ + self::DATA_SOURCE_UNSPECIFIED => 'DATA_SOURCE_UNSPECIFIED', + self::UDM => 'UDM', + self::ENTITY => 'ENTITY', + self::INGESTION_METRICS => 'INGESTION_METRICS', + self::RULE_DETECTIONS => 'RULE_DETECTIONS', + self::RULESETS => 'RULESETS', + self::PBGLOBAL => 'GLOBAL', + self::IOC_MATCHES => 'IOC_MATCHES', + self::RULES => 'RULES', + self::SOAR_CASES => 'SOAR_CASES', + self::SOAR_PLAYBOOKS => 'SOAR_PLAYBOOKS', + self::SOAR_CASE_HISTORY => 'SOAR_CASE_HISTORY', + self::DATA_TABLE => 'DATA_TABLE', + self::INVESTIGATION => 'INVESTIGATION', + self::INVESTIGATION_FEEDBACK => 'INVESTIGATION_FEEDBACK', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/DataSourceExportSettings.php b/Chronicle/src/V1/DataSourceExportSettings.php new file mode 100644 index 00000000000..21b5dad0e17 --- /dev/null +++ b/Chronicle/src/V1/DataSourceExportSettings.php @@ -0,0 +1,217 @@ +google.cloud.chronicle.v1.DataSourceExportSettings + */ +class DataSourceExportSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Whether the data source is enabled for export. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $enabled = false; + /** + * Required. The retention period for the data source in days. + * + * Generated from protobuf field int32 retention_days = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $retention_days = 0; + /** + * Output only. The state of the latest data source export job. + * + * Generated from protobuf field .google.cloud.chronicle.v1.LatestExportJobState latest_export_job_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $latest_export_job_state = 0; + /** + * Output only. The data freshness of the given export which represents the + * time bucket at which the latest event was exported. + * + * Generated from protobuf field .google.protobuf.Timestamp data_freshness_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $data_freshness_time = null; + /** + * Output only. The stored data volume of all the exports. + * + * Generated from protobuf field int64 data_volume = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $data_volume = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * Required. Whether the data source is enabled for export. + * @type int $retention_days + * Required. The retention period for the data source in days. + * @type int $latest_export_job_state + * Output only. The state of the latest data source export job. + * @type \Google\Protobuf\Timestamp $data_freshness_time + * Output only. The data freshness of the given export which represents the + * time bucket at which the latest event was exported. + * @type int|string $data_volume + * Output only. The stored data volume of all the exports. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\BigQueryExport::initOnce(); + parent::__construct($data); + } + + /** + * Required. Whether the data source is enabled for export. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Required. Whether the data source is enabled for export. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Required. The retention period for the data source in days. + * + * Generated from protobuf field int32 retention_days = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getRetentionDays() + { + return $this->retention_days; + } + + /** + * Required. The retention period for the data source in days. + * + * Generated from protobuf field int32 retention_days = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setRetentionDays($var) + { + GPBUtil::checkInt32($var); + $this->retention_days = $var; + + return $this; + } + + /** + * Output only. The state of the latest data source export job. + * + * Generated from protobuf field .google.cloud.chronicle.v1.LatestExportJobState latest_export_job_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getLatestExportJobState() + { + return $this->latest_export_job_state; + } + + /** + * Output only. The state of the latest data source export job. + * + * Generated from protobuf field .google.cloud.chronicle.v1.LatestExportJobState latest_export_job_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setLatestExportJobState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\LatestExportJobState::class); + $this->latest_export_job_state = $var; + + return $this; + } + + /** + * Output only. The data freshness of the given export which represents the + * time bucket at which the latest event was exported. + * + * Generated from protobuf field .google.protobuf.Timestamp data_freshness_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDataFreshnessTime() + { + return $this->data_freshness_time; + } + + public function hasDataFreshnessTime() + { + return isset($this->data_freshness_time); + } + + public function clearDataFreshnessTime() + { + unset($this->data_freshness_time); + } + + /** + * Output only. The data freshness of the given export which represents the + * time bucket at which the latest event was exported. + * + * Generated from protobuf field .google.protobuf.Timestamp data_freshness_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDataFreshnessTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->data_freshness_time = $var; + + return $this; + } + + /** + * Output only. The stored data volume of all the exports. + * + * Generated from protobuf field int64 data_volume = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getDataVolume() + { + return $this->data_volume; + } + + /** + * Output only. The stored data volume of all the exports. + * + * Generated from protobuf field int64 data_volume = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setDataVolume($var) + { + GPBUtil::checkInt64($var); + $this->data_volume = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DeleteNativeDashboardRequest.php b/Chronicle/src/V1/DeleteNativeDashboardRequest.php new file mode 100644 index 00000000000..5875f97849e --- /dev/null +++ b/Chronicle/src/V1/DeleteNativeDashboardRequest.php @@ -0,0 +1,91 @@ +google.cloud.chronicle.v1.DeleteNativeDashboardRequest + */ +class DeleteNativeDashboardRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The dashboard name to delete. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The dashboard name to delete. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * Please see {@see NativeDashboardServiceClient::nativeDashboardName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\DeleteNativeDashboardRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The dashboard name to delete. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Required. The dashboard name to delete. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The dashboard name to delete. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DuplicateChartRequest.php b/Chronicle/src/V1/DuplicateChartRequest.php new file mode 100644 index 00000000000..9475a9dc17e --- /dev/null +++ b/Chronicle/src/V1/DuplicateChartRequest.php @@ -0,0 +1,125 @@ +google.cloud.chronicle.v1.DuplicateChartRequest + */ +class DuplicateChartRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The dashboard name that involves chart duplication. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The dashboard chart name to duplicate. + * + * Generated from protobuf field string dashboard_chart = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $dashboard_chart = ''; + + /** + * @param string $name Required. The dashboard name that involves chart duplication. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * Please see {@see NativeDashboardServiceClient::nativeDashboardName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\DuplicateChartRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The dashboard name that involves chart duplication. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * @type string $dashboard_chart + * Required. The dashboard chart name to duplicate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Required. The dashboard name that involves chart duplication. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The dashboard name that involves chart duplication. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The dashboard chart name to duplicate. + * + * Generated from protobuf field string dashboard_chart = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getDashboardChart() + { + return $this->dashboard_chart; + } + + /** + * Required. The dashboard chart name to duplicate. + * + * Generated from protobuf field string dashboard_chart = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDashboardChart($var) + { + GPBUtil::checkString($var, True); + $this->dashboard_chart = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DuplicateChartResponse.php b/Chronicle/src/V1/DuplicateChartResponse.php new file mode 100644 index 00000000000..f8f041f4917 --- /dev/null +++ b/Chronicle/src/V1/DuplicateChartResponse.php @@ -0,0 +1,121 @@ +google.cloud.chronicle.v1.DuplicateChartResponse + */ +class DuplicateChartResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Dashboard with chart added in definition. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard native_dashboard = 1; + */ + protected $native_dashboard = null; + /** + * Duplicated chart resource. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart dashboard_chart = 2; + */ + protected $dashboard_chart = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\NativeDashboard $native_dashboard + * Dashboard with chart added in definition. + * @type \Google\Cloud\Chronicle\V1\DashboardChart $dashboard_chart + * Duplicated chart resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Dashboard with chart added in definition. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard native_dashboard = 1; + * @return \Google\Cloud\Chronicle\V1\NativeDashboard|null + */ + public function getNativeDashboard() + { + return $this->native_dashboard; + } + + public function hasNativeDashboard() + { + return isset($this->native_dashboard); + } + + public function clearNativeDashboard() + { + unset($this->native_dashboard); + } + + /** + * Dashboard with chart added in definition. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard native_dashboard = 1; + * @param \Google\Cloud\Chronicle\V1\NativeDashboard $var + * @return $this + */ + public function setNativeDashboard($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\NativeDashboard::class); + $this->native_dashboard = $var; + + return $this; + } + + /** + * Duplicated chart resource. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart dashboard_chart = 2; + * @return \Google\Cloud\Chronicle\V1\DashboardChart|null + */ + public function getDashboardChart() + { + return $this->dashboard_chart; + } + + public function hasDashboardChart() + { + return isset($this->dashboard_chart); + } + + public function clearDashboardChart() + { + unset($this->dashboard_chart); + } + + /** + * Duplicated chart resource. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart dashboard_chart = 2; + * @param \Google\Cloud\Chronicle\V1\DashboardChart $var + * @return $this + */ + public function setDashboardChart($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart::class); + $this->dashboard_chart = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/DuplicateNativeDashboardRequest.php b/Chronicle/src/V1/DuplicateNativeDashboardRequest.php new file mode 100644 index 00000000000..3792bba9ae5 --- /dev/null +++ b/Chronicle/src/V1/DuplicateNativeDashboardRequest.php @@ -0,0 +1,142 @@ +google.cloud.chronicle.v1.DuplicateNativeDashboardRequest + */ +class DuplicateNativeDashboardRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The dashboard name to duplicate. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Any fields that need modification can be passed through this like + * name, description etc. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard native_dashboard = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $native_dashboard = null; + + /** + * @param string $name Required. The dashboard name to duplicate. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * Please see {@see NativeDashboardServiceClient::nativeDashboardName()} for help formatting this field. + * @param \Google\Cloud\Chronicle\V1\NativeDashboard $nativeDashboard Required. Any fields that need modification can be passed through this like + * name, description etc. + * + * @return \Google\Cloud\Chronicle\V1\DuplicateNativeDashboardRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\Chronicle\V1\NativeDashboard $nativeDashboard): self + { + return (new self()) + ->setName($name) + ->setNativeDashboard($nativeDashboard); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The dashboard name to duplicate. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * @type \Google\Cloud\Chronicle\V1\NativeDashboard $native_dashboard + * Required. Any fields that need modification can be passed through this like + * name, description etc. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Required. The dashboard name to duplicate. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The dashboard name to duplicate. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Any fields that need modification can be passed through this like + * name, description etc. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard native_dashboard = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\NativeDashboard|null + */ + public function getNativeDashboard() + { + return $this->native_dashboard; + } + + public function hasNativeDashboard() + { + return isset($this->native_dashboard); + } + + public function clearNativeDashboard() + { + unset($this->native_dashboard); + } + + /** + * Required. Any fields that need modification can be passed through this like + * name, description etc. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard native_dashboard = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\NativeDashboard $var + * @return $this + */ + public function setNativeDashboard($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\NativeDashboard::class); + $this->native_dashboard = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/EditChartRequest.php b/Chronicle/src/V1/EditChartRequest.php new file mode 100644 index 00000000000..cad00c14614 --- /dev/null +++ b/Chronicle/src/V1/EditChartRequest.php @@ -0,0 +1,318 @@ +google.cloud.chronicle.v1.EditChartRequest + */ +class EditChartRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The dashboard name to edit chart in. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Query for the edited chart. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardQuery dashboard_query = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $dashboard_query = null; + /** + * Optional. Edited chart. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart dashboard_chart = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $dashboard_chart = null; + /** + * Required. The list of fields to edit for chart and query. + * Supported paths in chart are - + * dashboard_chart.display_name + * dashboard_chart.description + * dashboard_chart.chart_datasource.data_sources + * dashboard_chart.visualization + * dashboard_chart.visualization.button + * dashboard_chart.visualization.markdown + * dashboard_chart.drill_down_config + * Supported paths in query are - + * dashboard_query.query + * dashboard_query.input + * + * Generated from protobuf field .google.protobuf.FieldMask edit_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $edit_mask = null; + /** + * Optional. Language Features present in the query. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.LanguageFeature language_features = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $language_features; + + /** + * @param string $name Required. The dashboard name to edit chart in. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * Please see {@see NativeDashboardServiceClient::nativeDashboardName()} for help formatting this field. + * @param \Google\Cloud\Chronicle\V1\DashboardQuery $dashboardQuery Optional. Query for the edited chart. + * @param \Google\Cloud\Chronicle\V1\DashboardChart $dashboardChart Optional. Edited chart. + * @param \Google\Protobuf\FieldMask $editMask Required. The list of fields to edit for chart and query. + * Supported paths in chart are - + * dashboard_chart.display_name + * dashboard_chart.description + * dashboard_chart.chart_datasource.data_sources + * dashboard_chart.visualization + * dashboard_chart.visualization.button + * dashboard_chart.visualization.markdown + * dashboard_chart.drill_down_config + * Supported paths in query are - + * dashboard_query.query + * dashboard_query.input + * + * @return \Google\Cloud\Chronicle\V1\EditChartRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\Chronicle\V1\DashboardQuery $dashboardQuery, \Google\Cloud\Chronicle\V1\DashboardChart $dashboardChart, \Google\Protobuf\FieldMask $editMask): self + { + return (new self()) + ->setName($name) + ->setDashboardQuery($dashboardQuery) + ->setDashboardChart($dashboardChart) + ->setEditMask($editMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The dashboard name to edit chart in. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * @type \Google\Cloud\Chronicle\V1\DashboardQuery $dashboard_query + * Optional. Query for the edited chart. + * @type \Google\Cloud\Chronicle\V1\DashboardChart $dashboard_chart + * Optional. Edited chart. + * @type \Google\Protobuf\FieldMask $edit_mask + * Required. The list of fields to edit for chart and query. + * Supported paths in chart are - + * dashboard_chart.display_name + * dashboard_chart.description + * dashboard_chart.chart_datasource.data_sources + * dashboard_chart.visualization + * dashboard_chart.visualization.button + * dashboard_chart.visualization.markdown + * dashboard_chart.drill_down_config + * Supported paths in query are - + * dashboard_query.query + * dashboard_query.input + * @type int[] $language_features + * Optional. Language Features present in the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Required. The dashboard name to edit chart in. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The dashboard name to edit chart in. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Query for the edited chart. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardQuery dashboard_query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardQuery|null + */ + public function getDashboardQuery() + { + return $this->dashboard_query; + } + + public function hasDashboardQuery() + { + return isset($this->dashboard_query); + } + + public function clearDashboardQuery() + { + unset($this->dashboard_query); + } + + /** + * Optional. Query for the edited chart. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardQuery dashboard_query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardQuery $var + * @return $this + */ + public function setDashboardQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardQuery::class); + $this->dashboard_query = $var; + + return $this; + } + + /** + * Optional. Edited chart. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart dashboard_chart = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardChart|null + */ + public function getDashboardChart() + { + return $this->dashboard_chart; + } + + public function hasDashboardChart() + { + return isset($this->dashboard_chart); + } + + public function clearDashboardChart() + { + unset($this->dashboard_chart); + } + + /** + * Optional. Edited chart. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart dashboard_chart = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart $var + * @return $this + */ + public function setDashboardChart($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart::class); + $this->dashboard_chart = $var; + + return $this; + } + + /** + * Required. The list of fields to edit for chart and query. + * Supported paths in chart are - + * dashboard_chart.display_name + * dashboard_chart.description + * dashboard_chart.chart_datasource.data_sources + * dashboard_chart.visualization + * dashboard_chart.visualization.button + * dashboard_chart.visualization.markdown + * dashboard_chart.drill_down_config + * Supported paths in query are - + * dashboard_query.query + * dashboard_query.input + * + * Generated from protobuf field .google.protobuf.FieldMask edit_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getEditMask() + { + return $this->edit_mask; + } + + public function hasEditMask() + { + return isset($this->edit_mask); + } + + public function clearEditMask() + { + unset($this->edit_mask); + } + + /** + * Required. The list of fields to edit for chart and query. + * Supported paths in chart are - + * dashboard_chart.display_name + * dashboard_chart.description + * dashboard_chart.chart_datasource.data_sources + * dashboard_chart.visualization + * dashboard_chart.visualization.button + * dashboard_chart.visualization.markdown + * dashboard_chart.drill_down_config + * Supported paths in query are - + * dashboard_query.query + * dashboard_query.input + * + * Generated from protobuf field .google.protobuf.FieldMask edit_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setEditMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->edit_mask = $var; + + return $this; + } + + /** + * Optional. Language Features present in the query. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.LanguageFeature language_features = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getLanguageFeatures() + { + return $this->language_features; + } + + /** + * Optional. Language Features present in the query. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.LanguageFeature language_features = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int[] $var + * @return $this + */ + public function setLanguageFeatures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Chronicle\V1\LanguageFeature::class); + $this->language_features = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/EditChartResponse.php b/Chronicle/src/V1/EditChartResponse.php new file mode 100644 index 00000000000..dc3b323f23d --- /dev/null +++ b/Chronicle/src/V1/EditChartResponse.php @@ -0,0 +1,121 @@ +google.cloud.chronicle.v1.EditChartResponse + */ +class EditChartResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Edited dashboard. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard native_dashboard = 1; + */ + protected $native_dashboard = null; + /** + * Edited chart resource. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart dashboard_chart = 2; + */ + protected $dashboard_chart = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\NativeDashboard $native_dashboard + * Edited dashboard. + * @type \Google\Cloud\Chronicle\V1\DashboardChart $dashboard_chart + * Edited chart resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Edited dashboard. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard native_dashboard = 1; + * @return \Google\Cloud\Chronicle\V1\NativeDashboard|null + */ + public function getNativeDashboard() + { + return $this->native_dashboard; + } + + public function hasNativeDashboard() + { + return isset($this->native_dashboard); + } + + public function clearNativeDashboard() + { + unset($this->native_dashboard); + } + + /** + * Edited dashboard. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard native_dashboard = 1; + * @param \Google\Cloud\Chronicle\V1\NativeDashboard $var + * @return $this + */ + public function setNativeDashboard($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\NativeDashboard::class); + $this->native_dashboard = $var; + + return $this; + } + + /** + * Edited chart resource. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart dashboard_chart = 2; + * @return \Google\Cloud\Chronicle\V1\DashboardChart|null + */ + public function getDashboardChart() + { + return $this->dashboard_chart; + } + + public function hasDashboardChart() + { + return isset($this->dashboard_chart); + } + + public function clearDashboardChart() + { + unset($this->dashboard_chart); + } + + /** + * Edited chart resource. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardChart dashboard_chart = 2; + * @param \Google\Cloud\Chronicle\V1\DashboardChart $var + * @return $this + */ + public function setDashboardChart($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardChart::class); + $this->dashboard_chart = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/ExecuteDashboardQueryRequest.php b/Chronicle/src/V1/ExecuteDashboardQueryRequest.php new file mode 100644 index 00000000000..73f303fb1bc --- /dev/null +++ b/Chronicle/src/V1/ExecuteDashboardQueryRequest.php @@ -0,0 +1,257 @@ +google.cloud.chronicle.v1.ExecuteDashboardQueryRequest + */ +class ExecuteDashboardQueryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, under which to run this dashboardQuery. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The query to execute and get results back for. + * QueryID or 'query', 'input.time_window' fields will be used. Use + * 'native_dashboard' and 'dashboard_chart' fields if it is an in-dashboard + * query. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardQuery query = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = null; + /** + * Optional. Dashboard level filters other than query string. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardFilter filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $filters; + /** + * Optional. When true, the backend would read from the database, rather than + * fetching data directly from the cache. + * + * Generated from protobuf field bool clear_cache = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $clear_cache = false; + /** + * Optional. When true, the backend will execute the query against the + * previous time range of the query. + * + * Generated from protobuf field bool use_previous_time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $use_previous_time_range = false; + + /** + * @param string $parent Required. The parent, under which to run this dashboardQuery. + * Format: projects/{project}/locations/{location}/instances/{instance} + * Please see {@see DashboardQueryServiceClient::instanceName()} for help formatting this field. + * @param \Google\Cloud\Chronicle\V1\DashboardQuery $query Required. The query to execute and get results back for. + * QueryID or 'query', 'input.time_window' fields will be used. Use + * 'native_dashboard' and 'dashboard_chart' fields if it is an in-dashboard + * query. + * + * @return \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Chronicle\V1\DashboardQuery $query): self + { + return (new self()) + ->setParent($parent) + ->setQuery($query); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, under which to run this dashboardQuery. + * Format: projects/{project}/locations/{location}/instances/{instance} + * @type \Google\Cloud\Chronicle\V1\DashboardQuery $query + * Required. The query to execute and get results back for. + * QueryID or 'query', 'input.time_window' fields will be used. Use + * 'native_dashboard' and 'dashboard_chart' fields if it is an in-dashboard + * query. + * @type \Google\Cloud\Chronicle\V1\DashboardFilter[] $filters + * Optional. Dashboard level filters other than query string. + * @type bool $clear_cache + * Optional. When true, the backend would read from the database, rather than + * fetching data directly from the cache. + * @type bool $use_previous_time_range + * Optional. When true, the backend will execute the query against the + * previous time range of the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, under which to run this dashboardQuery. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, under which to run this dashboardQuery. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The query to execute and get results back for. + * QueryID or 'query', 'input.time_window' fields will be used. Use + * 'native_dashboard' and 'dashboard_chart' fields if it is an in-dashboard + * query. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardQuery query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\DashboardQuery|null + */ + public function getQuery() + { + return $this->query; + } + + public function hasQuery() + { + return isset($this->query); + } + + public function clearQuery() + { + unset($this->query); + } + + /** + * Required. The query to execute and get results back for. + * QueryID or 'query', 'input.time_window' fields will be used. Use + * 'native_dashboard' and 'dashboard_chart' fields if it is an in-dashboard + * query. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardQuery query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\DashboardQuery $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardQuery::class); + $this->query = $var; + + return $this; + } + + /** + * Optional. Dashboard level filters other than query string. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardFilter filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DashboardFilter> + */ + public function getFilters() + { + return $this->filters; + } + + /** + * Optional. Dashboard level filters other than query string. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardFilter filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardFilter[] $var + * @return $this + */ + public function setFilters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DashboardFilter::class); + $this->filters = $arr; + + return $this; + } + + /** + * Optional. When true, the backend would read from the database, rather than + * fetching data directly from the cache. + * + * Generated from protobuf field bool clear_cache = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getClearCache() + { + return $this->clear_cache; + } + + /** + * Optional. When true, the backend would read from the database, rather than + * fetching data directly from the cache. + * + * Generated from protobuf field bool clear_cache = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setClearCache($var) + { + GPBUtil::checkBool($var); + $this->clear_cache = $var; + + return $this; + } + + /** + * Optional. When true, the backend will execute the query against the + * previous time range of the query. + * + * Generated from protobuf field bool use_previous_time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUsePreviousTimeRange() + { + return $this->use_previous_time_range; + } + + /** + * Optional. When true, the backend will execute the query against the + * previous time range of the query. + * + * Generated from protobuf field bool use_previous_time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUsePreviousTimeRange($var) + { + GPBUtil::checkBool($var); + $this->use_previous_time_range = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/ExecuteDashboardQueryResponse.php b/Chronicle/src/V1/ExecuteDashboardQueryResponse.php new file mode 100644 index 00000000000..3df4d3c979f --- /dev/null +++ b/Chronicle/src/V1/ExecuteDashboardQueryResponse.php @@ -0,0 +1,261 @@ +google.cloud.chronicle.v1.ExecuteDashboardQueryResponse + */ +class ExecuteDashboardQueryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Result rows that are queried. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnData results = 1; + */ + private $results; + /** + * Datasource of the query and results. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataSource data_sources = 3; + */ + private $data_sources; + /** + * Optional. Last time the cache was refreshed. This would be used by the UI + * to show the last updated time. + * + * Generated from protobuf field .google.protobuf.Timestamp last_backend_cache_refreshed_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $last_backend_cache_refreshed_time = null; + /** + * Time window against which query was executed. + * + * Generated from protobuf field .google.type.Interval time_window = 5; + */ + protected $time_window = null; + /** + * Runtime errors + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.QueryRuntimeError query_runtime_errors = 6; + */ + private $query_runtime_errors; + /** + * Optional. Language features found in the query. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.LanguageFeature language_features = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $language_features; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnData[] $results + * Result rows that are queried. + * @type int[] $data_sources + * Datasource of the query and results. + * @type \Google\Protobuf\Timestamp $last_backend_cache_refreshed_time + * Optional. Last time the cache was refreshed. This would be used by the UI + * to show the last updated time. + * @type \Google\Type\Interval $time_window + * Time window against which query was executed. + * @type \Google\Cloud\Chronicle\V1\QueryRuntimeError[] $query_runtime_errors + * Runtime errors + * @type int[] $language_features + * Optional. Language features found in the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * Result rows that are queried. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnData results = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnData> + */ + public function getResults() + { + return $this->results; + } + + /** + * Result rows that are queried. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnData results = 1; + * @param \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnData[] $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnData::class); + $this->results = $arr; + + return $this; + } + + /** + * Datasource of the query and results. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataSource data_sources = 3; + * @return RepeatedField + */ + public function getDataSources() + { + return $this->data_sources; + } + + /** + * Datasource of the query and results. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DataSource data_sources = 3; + * @param int[] $var + * @return $this + */ + public function setDataSources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Chronicle\V1\DataSource::class); + $this->data_sources = $arr; + + return $this; + } + + /** + * Optional. Last time the cache was refreshed. This would be used by the UI + * to show the last updated time. + * + * Generated from protobuf field .google.protobuf.Timestamp last_backend_cache_refreshed_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastBackendCacheRefreshedTime() + { + return $this->last_backend_cache_refreshed_time; + } + + public function hasLastBackendCacheRefreshedTime() + { + return isset($this->last_backend_cache_refreshed_time); + } + + public function clearLastBackendCacheRefreshedTime() + { + unset($this->last_backend_cache_refreshed_time); + } + + /** + * Optional. Last time the cache was refreshed. This would be used by the UI + * to show the last updated time. + * + * Generated from protobuf field .google.protobuf.Timestamp last_backend_cache_refreshed_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastBackendCacheRefreshedTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_backend_cache_refreshed_time = $var; + + return $this; + } + + /** + * Time window against which query was executed. + * + * Generated from protobuf field .google.type.Interval time_window = 5; + * @return \Google\Type\Interval|null + */ + public function getTimeWindow() + { + return $this->time_window; + } + + public function hasTimeWindow() + { + return isset($this->time_window); + } + + public function clearTimeWindow() + { + unset($this->time_window); + } + + /** + * Time window against which query was executed. + * + * Generated from protobuf field .google.type.Interval time_window = 5; + * @param \Google\Type\Interval $var + * @return $this + */ + public function setTimeWindow($var) + { + GPBUtil::checkMessage($var, \Google\Type\Interval::class); + $this->time_window = $var; + + return $this; + } + + /** + * Runtime errors + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.QueryRuntimeError query_runtime_errors = 6; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\QueryRuntimeError> + */ + public function getQueryRuntimeErrors() + { + return $this->query_runtime_errors; + } + + /** + * Runtime errors + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.QueryRuntimeError query_runtime_errors = 6; + * @param \Google\Cloud\Chronicle\V1\QueryRuntimeError[] $var + * @return $this + */ + public function setQueryRuntimeErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\QueryRuntimeError::class); + $this->query_runtime_errors = $arr; + + return $this; + } + + /** + * Optional. Language features found in the query. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.LanguageFeature language_features = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getLanguageFeatures() + { + return $this->language_features; + } + + /** + * Optional. Language features found in the query. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.LanguageFeature language_features = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int[] $var + * @return $this + */ + public function setLanguageFeatures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Chronicle\V1\LanguageFeature::class); + $this->language_features = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/ExecuteDashboardQueryResponse/ColumnData.php b/Chronicle/src/V1/ExecuteDashboardQueryResponse/ColumnData.php new file mode 100644 index 00000000000..b8e4df0aca8 --- /dev/null +++ b/Chronicle/src/V1/ExecuteDashboardQueryResponse/ColumnData.php @@ -0,0 +1,143 @@ +google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnData + */ +class ColumnData extends \Google\Protobuf\Internal\Message +{ + /** + * Used to store column names. + * + * Generated from protobuf field string column = 1; + */ + protected $column = ''; + /** + * To store column data. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType values = 2; + */ + private $values; + /** + * To store column metadata. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ColumnMetadata metadata = 3; + */ + protected $metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $column + * Used to store column names. + * @type \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnType[] $values + * To store column data. + * @type \Google\Cloud\Chronicle\V1\ColumnMetadata $metadata + * To store column metadata. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * Used to store column names. + * + * Generated from protobuf field string column = 1; + * @return string + */ + public function getColumn() + { + return $this->column; + } + + /** + * Used to store column names. + * + * Generated from protobuf field string column = 1; + * @param string $var + * @return $this + */ + public function setColumn($var) + { + GPBUtil::checkString($var, True); + $this->column = $var; + + return $this; + } + + /** + * To store column data. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType values = 2; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnType> + */ + public function getValues() + { + return $this->values; + } + + /** + * To store column data. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType values = 2; + * @param \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnType[] $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnType::class); + $this->values = $arr; + + return $this; + } + + /** + * To store column metadata. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ColumnMetadata metadata = 3; + * @return \Google\Cloud\Chronicle\V1\ColumnMetadata|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * To store column metadata. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ColumnMetadata metadata = 3; + * @param \Google\Cloud\Chronicle\V1\ColumnMetadata $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\ColumnMetadata::class); + $this->metadata = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/ExecuteDashboardQueryResponse/ColumnType.php b/Chronicle/src/V1/ExecuteDashboardQueryResponse/ColumnType.php new file mode 100644 index 00000000000..7f504659a31 --- /dev/null +++ b/Chronicle/src/V1/ExecuteDashboardQueryResponse/ColumnType.php @@ -0,0 +1,108 @@ +google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType + */ +class ColumnType extends \Google\Protobuf\Internal\Message +{ + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnValue $value + * Single value in a column. + * @type \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnType\PBList $list + * List of values in a column e.g. IPs + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * Single value in a column. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue value = 1; + * @return \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnValue|null + */ + public function getValue() + { + return $this->readOneof(1); + } + + public function hasValue() + { + return $this->hasOneof(1); + } + + /** + * Single value in a column. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue value = 1; + * @param \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnValue $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnValue::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * List of values in a column e.g. IPs + * + * Generated from protobuf field .google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType.List list = 2; + * @return \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnType\PBList|null + */ + public function getList() + { + return $this->readOneof(2); + } + + public function hasList() + { + return $this->hasOneof(2); + } + + /** + * List of values in a column e.g. IPs + * + * Generated from protobuf field .google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType.List list = 2; + * @param \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnType\PBList $var + * @return $this + */ + public function setList($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnType\PBList::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + diff --git a/Chronicle/src/V1/ExecuteDashboardQueryResponse/ColumnType/PBList.php b/Chronicle/src/V1/ExecuteDashboardQueryResponse/ColumnType/PBList.php new file mode 100644 index 00000000000..6ea5b09b548 --- /dev/null +++ b/Chronicle/src/V1/ExecuteDashboardQueryResponse/ColumnType/PBList.php @@ -0,0 +1,60 @@ +google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType.List + */ +class PBList extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue values = 1; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnValue[] $values + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue values = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnValue> + */ + public function getValues() + { + return $this->values; + } + + /** + * Generated from protobuf field repeated .google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue values = 1; + * @param \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnValue[] $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnValue::class); + $this->values = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/ExecuteDashboardQueryResponse/ColumnValue.php b/Chronicle/src/V1/ExecuteDashboardQueryResponse/ColumnValue.php new file mode 100644 index 00000000000..aba08e522e0 --- /dev/null +++ b/Chronicle/src/V1/ExecuteDashboardQueryResponse/ColumnValue.php @@ -0,0 +1,410 @@ +google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue + */ +class ColumnValue extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue.ValueMetadata metadata = 11; + */ + protected $metadata = null; + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $null_val + * True if the value is NULL. + * @type bool $bool_val + * Boolean value. + * @type string $bytes_val + * Bytes value. + * @type float $double_val + * Double value. + * @type int|string $int64_val + * Integer value (signed). + * @type int|string $uint64_val + * Un-signed integer value. + * @type string $string_val + * String value. Enum values are returned as strings. + * @type \Google\Protobuf\Timestamp $timestamp_val + * Timestamp values. Does not handle `interval`. + * @type \Google\Type\Date $date_val + * Date values. + * @type \Google\Protobuf\Any $proto_val + * For any proto values that are not any of the above. + * @type \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnValue\ValueMetadata $metadata + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * True if the value is NULL. + * + * Generated from protobuf field bool null_val = 1; + * @return bool + */ + public function getNullVal() + { + return $this->readOneof(1); + } + + public function hasNullVal() + { + return $this->hasOneof(1); + } + + /** + * True if the value is NULL. + * + * Generated from protobuf field bool null_val = 1; + * @param bool $var + * @return $this + */ + public function setNullVal($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Boolean value. + * + * Generated from protobuf field bool bool_val = 2; + * @return bool + */ + public function getBoolVal() + { + return $this->readOneof(2); + } + + public function hasBoolVal() + { + return $this->hasOneof(2); + } + + /** + * Boolean value. + * + * Generated from protobuf field bool bool_val = 2; + * @param bool $var + * @return $this + */ + public function setBoolVal($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Bytes value. + * + * Generated from protobuf field bytes bytes_val = 3; + * @return string + */ + public function getBytesVal() + { + return $this->readOneof(3); + } + + public function hasBytesVal() + { + return $this->hasOneof(3); + } + + /** + * Bytes value. + * + * Generated from protobuf field bytes bytes_val = 3; + * @param string $var + * @return $this + */ + public function setBytesVal($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Double value. + * + * Generated from protobuf field double double_val = 4; + * @return float + */ + public function getDoubleVal() + { + return $this->readOneof(4); + } + + public function hasDoubleVal() + { + return $this->hasOneof(4); + } + + /** + * Double value. + * + * Generated from protobuf field double double_val = 4; + * @param float $var + * @return $this + */ + public function setDoubleVal($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Integer value (signed). + * + * Generated from protobuf field int64 int64_val = 5; + * @return int|string + */ + public function getInt64Val() + { + return $this->readOneof(5); + } + + public function hasInt64Val() + { + return $this->hasOneof(5); + } + + /** + * Integer value (signed). + * + * Generated from protobuf field int64 int64_val = 5; + * @param int|string $var + * @return $this + */ + public function setInt64Val($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Un-signed integer value. + * + * Generated from protobuf field uint64 uint64_val = 6; + * @return int|string + */ + public function getUint64Val() + { + return $this->readOneof(6); + } + + public function hasUint64Val() + { + return $this->hasOneof(6); + } + + /** + * Un-signed integer value. + * + * Generated from protobuf field uint64 uint64_val = 6; + * @param int|string $var + * @return $this + */ + public function setUint64Val($var) + { + GPBUtil::checkUint64($var); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * String value. Enum values are returned as strings. + * + * Generated from protobuf field string string_val = 7; + * @return string + */ + public function getStringVal() + { + return $this->readOneof(7); + } + + public function hasStringVal() + { + return $this->hasOneof(7); + } + + /** + * String value. Enum values are returned as strings. + * + * Generated from protobuf field string string_val = 7; + * @param string $var + * @return $this + */ + public function setStringVal($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Timestamp values. Does not handle `interval`. + * + * Generated from protobuf field .google.protobuf.Timestamp timestamp_val = 8; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTimestampVal() + { + return $this->readOneof(8); + } + + public function hasTimestampVal() + { + return $this->hasOneof(8); + } + + /** + * Timestamp values. Does not handle `interval`. + * + * Generated from protobuf field .google.protobuf.Timestamp timestamp_val = 8; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTimestampVal($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Date values. + * + * Generated from protobuf field .google.type.Date date_val = 9; + * @return \Google\Type\Date|null + */ + public function getDateVal() + { + return $this->readOneof(9); + } + + public function hasDateVal() + { + return $this->hasOneof(9); + } + + /** + * Date values. + * + * Generated from protobuf field .google.type.Date date_val = 9; + * @param \Google\Type\Date $var + * @return $this + */ + public function setDateVal($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * For any proto values that are not any of the above. + * + * Generated from protobuf field .google.protobuf.Any proto_val = 10; + * @return \Google\Protobuf\Any|null + */ + public function getProtoVal() + { + return $this->readOneof(10); + } + + public function hasProtoVal() + { + return $this->hasOneof(10); + } + + /** + * For any proto values that are not any of the above. + * + * Generated from protobuf field .google.protobuf.Any proto_val = 10; + * @param \Google\Protobuf\Any $var + * @return $this + */ + public function setProtoVal($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue.ValueMetadata metadata = 11; + * @return \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnValue\ValueMetadata|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * Generated from protobuf field .google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue.ValueMetadata metadata = 11; + * @param \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnValue\ValueMetadata $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse\ColumnValue\ValueMetadata::class); + $this->metadata = $var; + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/Chronicle/src/V1/ExecuteDashboardQueryResponse/ColumnValue/ValueMetadata.php b/Chronicle/src/V1/ExecuteDashboardQueryResponse/ColumnValue/ValueMetadata.php new file mode 100644 index 00000000000..d3d25849132 --- /dev/null +++ b/Chronicle/src/V1/ExecuteDashboardQueryResponse/ColumnValue/ValueMetadata.php @@ -0,0 +1,140 @@ +google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue.ValueMetadata + */ +class ValueMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * "Auto" generated In-app links. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.InAppLink links = 1; + */ + private $links; + /** + * Generated from protobuf field repeated string field_paths = 2; + */ + private $field_paths; + /** + * Timestamp value to store the timestamp for the case of the date and + * time data type. + * + * Generated from protobuf field .google.protobuf.Timestamp timestamp_val = 3; + */ + protected $timestamp_val = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\InAppLink[] $links + * "Auto" generated In-app links. + * @type string[] $field_paths + * @type \Google\Protobuf\Timestamp $timestamp_val + * Timestamp value to store the timestamp for the case of the date and + * time data type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * "Auto" generated In-app links. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.InAppLink links = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\InAppLink> + */ + public function getLinks() + { + return $this->links; + } + + /** + * "Auto" generated In-app links. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.InAppLink links = 1; + * @param \Google\Cloud\Chronicle\V1\InAppLink[] $var + * @return $this + */ + public function setLinks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\InAppLink::class); + $this->links = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated string field_paths = 2; + * @return RepeatedField + */ + public function getFieldPaths() + { + return $this->field_paths; + } + + /** + * Generated from protobuf field repeated string field_paths = 2; + * @param string[] $var + * @return $this + */ + public function setFieldPaths($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->field_paths = $arr; + + return $this; + } + + /** + * Timestamp value to store the timestamp for the case of the date and + * time data type. + * + * Generated from protobuf field .google.protobuf.Timestamp timestamp_val = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTimestampVal() + { + return $this->timestamp_val; + } + + public function hasTimestampVal() + { + return isset($this->timestamp_val); + } + + public function clearTimestampVal() + { + unset($this->timestamp_val); + } + + /** + * Timestamp value to store the timestamp for the case of the date and + * time data type. + * + * Generated from protobuf field .google.protobuf.Timestamp timestamp_val = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTimestampVal($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->timestamp_val = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/ExportNativeDashboardsRequest.php b/Chronicle/src/V1/ExportNativeDashboardsRequest.php new file mode 100644 index 00000000000..042cb057790 --- /dev/null +++ b/Chronicle/src/V1/ExportNativeDashboardsRequest.php @@ -0,0 +1,122 @@ +google.cloud.chronicle.v1.ExportNativeDashboardsRequest + */ +class ExportNativeDashboardsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource that the dashboards to be exported belong to. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The resource names of the dashboards to export. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $names; + + /** + * @param string $parent Required. The parent resource that the dashboards to be exported belong to. + * Format: projects/{project}/locations/{location}/instances/{instance} + * Please see {@see NativeDashboardServiceClient::instanceName()} for help formatting this field. + * @param string[] $names Required. The resource names of the dashboards to export. + * + * @return \Google\Cloud\Chronicle\V1\ExportNativeDashboardsRequest + * + * @experimental + */ + public static function build(string $parent, array $names): self + { + return (new self()) + ->setParent($parent) + ->setNames($names); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource that the dashboards to be exported belong to. + * Format: projects/{project}/locations/{location}/instances/{instance} + * @type string[] $names + * Required. The resource names of the dashboards to export. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource that the dashboards to be exported belong to. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource that the dashboards to be exported belong to. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The resource names of the dashboards to export. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the dashboards to export. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string[] $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/ExportNativeDashboardsResponse.php b/Chronicle/src/V1/ExportNativeDashboardsResponse.php new file mode 100644 index 00000000000..3f3ed5adb42 --- /dev/null +++ b/Chronicle/src/V1/ExportNativeDashboardsResponse.php @@ -0,0 +1,75 @@ +google.cloud.chronicle.v1.ExportNativeDashboardsResponse + */ +class ExportNativeDashboardsResponse extends \Google\Protobuf\Internal\Message +{ + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\InlineDestination $inline_destination + * The data for the exported dashboards included directly in the response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * The data for the exported dashboards included directly in the response. + * + * Generated from protobuf field .google.cloud.chronicle.v1.InlineDestination inline_destination = 1; + * @return \Google\Cloud\Chronicle\V1\InlineDestination|null + */ + public function getInlineDestination() + { + return $this->readOneof(1); + } + + public function hasInlineDestination() + { + return $this->hasOneof(1); + } + + /** + * The data for the exported dashboards included directly in the response. + * + * Generated from protobuf field .google.cloud.chronicle.v1.InlineDestination inline_destination = 1; + * @param \Google\Cloud\Chronicle\V1\InlineDestination $var + * @return $this + */ + public function setInlineDestination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\InlineDestination::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/Chronicle/src/V1/FeaturedContentMetadata.php b/Chronicle/src/V1/FeaturedContentMetadata.php new file mode 100644 index 00000000000..8f54c9eaa61 --- /dev/null +++ b/Chronicle/src/V1/FeaturedContentMetadata.php @@ -0,0 +1,445 @@ +google.cloud.chronicle.v1.FeaturedContentMetadata + */ +class FeaturedContentMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Unique identifier of the featured content. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $id = ''; + /** + * Output only. The display name of the featured content. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Output only. Timestamp indicating when the item was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Timestamp indicating when the item was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Content item author full name. + * + * Generated from protobuf field string author = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $author = ''; + /** + * Output only. Determine if this content item is officially certified by + * Google or created by the community. + * + * Generated from protobuf field bool certified = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $certified = false; + /** + * Output only. The description of the content item. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $description = ''; + /** + * Output only. Categories the content is associated with. + * + * Generated from protobuf field repeated string categories = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $categories; + /** + * Output only. Featured content version (Major.Minor.Patch). + * + * Generated from protobuf field string version = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $version = ''; + /** + * Output only. Whether the content is verified by Google (applicable for 3rd + * party content). + * + * Generated from protobuf field optional bool verified = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verified = null; + /** + * Output only. The source type of the content. + * + * Generated from protobuf field .google.cloud.chronicle.v1.FeaturedContentMetadata.ContentSourceType source_type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $source_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Required. Unique identifier of the featured content. + * @type string $display_name + * Output only. The display name of the featured content. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Timestamp indicating when the item was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Timestamp indicating when the item was updated. + * @type string $author + * Output only. Content item author full name. + * @type bool $certified + * Output only. Determine if this content item is officially certified by + * Google or created by the community. + * @type string $description + * Output only. The description of the content item. + * @type string[] $categories + * Output only. Categories the content is associated with. + * @type string $version + * Output only. Featured content version (Major.Minor.Patch). + * @type bool $verified + * Output only. Whether the content is verified by Google (applicable for 3rd + * party content). + * @type int $source_type + * Output only. The source type of the content. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\FeaturedContentMetadata::initOnce(); + parent::__construct($data); + } + + /** + * Required. Unique identifier of the featured content. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Required. Unique identifier of the featured content. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Output only. The display name of the featured content. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The display name of the featured content. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. Timestamp indicating when the item was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Timestamp indicating when the item was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Timestamp indicating when the item was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Timestamp indicating when the item was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. Content item author full name. + * + * Generated from protobuf field string author = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAuthor() + { + return $this->author; + } + + /** + * Output only. Content item author full name. + * + * Generated from protobuf field string author = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAuthor($var) + { + GPBUtil::checkString($var, True); + $this->author = $var; + + return $this; + } + + /** + * Output only. Determine if this content item is officially certified by + * Google or created by the community. + * + * Generated from protobuf field bool certified = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getCertified() + { + return $this->certified; + } + + /** + * Output only. Determine if this content item is officially certified by + * Google or created by the community. + * + * Generated from protobuf field bool certified = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setCertified($var) + { + GPBUtil::checkBool($var); + $this->certified = $var; + + return $this; + } + + /** + * Output only. The description of the content item. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Output only. The description of the content item. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Categories the content is associated with. + * + * Generated from protobuf field repeated string categories = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField + */ + public function getCategories() + { + return $this->categories; + } + + /** + * Output only. Categories the content is associated with. + * + * Generated from protobuf field repeated string categories = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string[] $var + * @return $this + */ + public function setCategories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->categories = $arr; + + return $this; + } + + /** + * Output only. Featured content version (Major.Minor.Patch). + * + * Generated from protobuf field string version = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Output only. Featured content version (Major.Minor.Patch). + * + * Generated from protobuf field string version = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Output only. Whether the content is verified by Google (applicable for 3rd + * party content). + * + * Generated from protobuf field optional bool verified = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getVerified() + { + return isset($this->verified) ? $this->verified : false; + } + + public function hasVerified() + { + return isset($this->verified); + } + + public function clearVerified() + { + unset($this->verified); + } + + /** + * Output only. Whether the content is verified by Google (applicable for 3rd + * party content). + * + * Generated from protobuf field optional bool verified = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setVerified($var) + { + GPBUtil::checkBool($var); + $this->verified = $var; + + return $this; + } + + /** + * Output only. The source type of the content. + * + * Generated from protobuf field .google.cloud.chronicle.v1.FeaturedContentMetadata.ContentSourceType source_type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getSourceType() + { + return $this->source_type; + } + + /** + * Output only. The source type of the content. + * + * Generated from protobuf field .google.cloud.chronicle.v1.FeaturedContentMetadata.ContentSourceType source_type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setSourceType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\FeaturedContentMetadata\ContentSourceType::class); + $this->source_type = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/FeaturedContentMetadata/ContentSourceType.php b/Chronicle/src/V1/FeaturedContentMetadata/ContentSourceType.php new file mode 100644 index 00000000000..534cef11ee2 --- /dev/null +++ b/Chronicle/src/V1/FeaturedContentMetadata/ContentSourceType.php @@ -0,0 +1,68 @@ +google.cloud.chronicle.v1.FeaturedContentMetadata.ContentSourceType + */ +class ContentSourceType +{ + /** + * Unspecified content source type + * + * Generated from protobuf enum CONTENT_SOURCE_TYPE_UNSPECIFIED = 0; + */ + const CONTENT_SOURCE_TYPE_UNSPECIFIED = 0; + /** + * Certified Google content source type + * + * Generated from protobuf enum GOOGLE = 1; + */ + const GOOGLE = 1; + /** + * Community content source type + * + * Generated from protobuf enum COMMUNITY = 2; + */ + const COMMUNITY = 2; + /** + * Partner content source type + * + * Generated from protobuf enum PARTNER = 3; + */ + const PARTNER = 3; + + private static $valueToName = [ + self::CONTENT_SOURCE_TYPE_UNSPECIFIED => 'CONTENT_SOURCE_TYPE_UNSPECIFIED', + self::GOOGLE => 'GOOGLE', + self::COMMUNITY => 'COMMUNITY', + self::PARTNER => 'PARTNER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/FeaturedContentNativeDashboard.php b/Chronicle/src/V1/FeaturedContentNativeDashboard.php new file mode 100644 index 00000000000..6ad1cded0da --- /dev/null +++ b/Chronicle/src/V1/FeaturedContentNativeDashboard.php @@ -0,0 +1,163 @@ +google.cloud.chronicle.v1.FeaturedContentNativeDashboard + */ +class FeaturedContentNativeDashboard extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the FeaturedContentNativeDashboard. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Metadata about the FeaturedContentNativeDashboard. + * + * Generated from protobuf field .google.cloud.chronicle.v1.FeaturedContentMetadata content_metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $content_metadata = null; + /** + * Optional. The dashboard content. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueries dashboard_content = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $dashboard_content = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the FeaturedContentNativeDashboard. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard} + * @type \Google\Cloud\Chronicle\V1\FeaturedContentMetadata $content_metadata + * Output only. Metadata about the FeaturedContentNativeDashboard. + * @type \Google\Cloud\Chronicle\V1\NativeDashboardWithChartsAndQueries $dashboard_content + * Optional. The dashboard content. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\FeaturedContentNativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the FeaturedContentNativeDashboard. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the FeaturedContentNativeDashboard. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Metadata about the FeaturedContentNativeDashboard. + * + * Generated from protobuf field .google.cloud.chronicle.v1.FeaturedContentMetadata content_metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Chronicle\V1\FeaturedContentMetadata|null + */ + public function getContentMetadata() + { + return $this->content_metadata; + } + + public function hasContentMetadata() + { + return isset($this->content_metadata); + } + + public function clearContentMetadata() + { + unset($this->content_metadata); + } + + /** + * Output only. Metadata about the FeaturedContentNativeDashboard. + * + * Generated from protobuf field .google.cloud.chronicle.v1.FeaturedContentMetadata content_metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Chronicle\V1\FeaturedContentMetadata $var + * @return $this + */ + public function setContentMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\FeaturedContentMetadata::class); + $this->content_metadata = $var; + + return $this; + } + + /** + * Optional. The dashboard content. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueries dashboard_content = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\NativeDashboardWithChartsAndQueries|null + */ + public function getDashboardContent() + { + return $this->dashboard_content; + } + + public function hasDashboardContent() + { + return isset($this->dashboard_content); + } + + public function clearDashboardContent() + { + unset($this->dashboard_content); + } + + /** + * Optional. The dashboard content. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueries dashboard_content = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\NativeDashboardWithChartsAndQueries $var + * @return $this + */ + public function setDashboardContent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\NativeDashboardWithChartsAndQueries::class); + $this->dashboard_content = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/FilterOperator.php b/Chronicle/src/V1/FilterOperator.php new file mode 100644 index 00000000000..d6762916225 --- /dev/null +++ b/Chronicle/src/V1/FilterOperator.php @@ -0,0 +1,139 @@ +google.cloud.chronicle.v1.FilterOperator + */ +class FilterOperator +{ + /** + * Default unspecified. + * + * Generated from protobuf enum FILTER_OPERATOR_UNSPECIFIED = 0; + */ + const FILTER_OPERATOR_UNSPECIFIED = 0; + /** + * Generated from protobuf enum EQUAL = 1; + */ + const EQUAL = 1; + /** + * Generated from protobuf enum NOT_EQUAL = 2; + */ + const NOT_EQUAL = 2; + /** + * Generated from protobuf enum IN = 3; + */ + const IN = 3; + /** + * Generated from protobuf enum GREATER_THAN = 4; + */ + const GREATER_THAN = 4; + /** + * Generated from protobuf enum GREATER_THAN_OR_EQUAL_TO = 5; + */ + const GREATER_THAN_OR_EQUAL_TO = 5; + /** + * Generated from protobuf enum LESS_THAN = 6; + */ + const LESS_THAN = 6; + /** + * Generated from protobuf enum LESS_THAN_OR_EQUAL_TO = 7; + */ + const LESS_THAN_OR_EQUAL_TO = 7; + /** + * Generated from protobuf enum BETWEEN = 8; + */ + const BETWEEN = 8; + /** + * Generated from protobuf enum PAST = 9; + */ + const PAST = 9; + /** + * Generated from protobuf enum IS_NULL = 10; + */ + const IS_NULL = 10; + /** + * Generated from protobuf enum IS_NOT_NULL = 11; + */ + const IS_NOT_NULL = 11; + /** + * Generated from protobuf enum STARTS_WITH = 12; + */ + const STARTS_WITH = 12; + /** + * Generated from protobuf enum ENDS_WITH = 13; + */ + const ENDS_WITH = 13; + /** + * Generated from protobuf enum DOES_NOT_STARTS_WITH = 14; + */ + const DOES_NOT_STARTS_WITH = 14; + /** + * Generated from protobuf enum DOES_NOT_ENDS_WITH = 15; + */ + const DOES_NOT_ENDS_WITH = 15; + /** + * Generated from protobuf enum NOT_IN = 16; + */ + const NOT_IN = 16; + /** + * CONTAINS is used for substring match. + * + * Generated from protobuf enum CONTAINS = 17; + */ + const CONTAINS = 17; + /** + * Used if we want to check if the field does not contain the substring. + * + * Generated from protobuf enum DOES_NOT_CONTAIN = 18; + */ + const DOES_NOT_CONTAIN = 18; + + private static $valueToName = [ + self::FILTER_OPERATOR_UNSPECIFIED => 'FILTER_OPERATOR_UNSPECIFIED', + self::EQUAL => 'EQUAL', + self::NOT_EQUAL => 'NOT_EQUAL', + self::IN => 'IN', + self::GREATER_THAN => 'GREATER_THAN', + self::GREATER_THAN_OR_EQUAL_TO => 'GREATER_THAN_OR_EQUAL_TO', + self::LESS_THAN => 'LESS_THAN', + self::LESS_THAN_OR_EQUAL_TO => 'LESS_THAN_OR_EQUAL_TO', + self::BETWEEN => 'BETWEEN', + self::PAST => 'PAST', + self::IS_NULL => 'IS_NULL', + self::IS_NOT_NULL => 'IS_NOT_NULL', + self::STARTS_WITH => 'STARTS_WITH', + self::ENDS_WITH => 'ENDS_WITH', + self::DOES_NOT_STARTS_WITH => 'DOES_NOT_STARTS_WITH', + self::DOES_NOT_ENDS_WITH => 'DOES_NOT_ENDS_WITH', + self::NOT_IN => 'NOT_IN', + self::CONTAINS => 'CONTAINS', + self::DOES_NOT_CONTAIN => 'DOES_NOT_CONTAIN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/FilterOperatorAndValues.php b/Chronicle/src/V1/FilterOperatorAndValues.php new file mode 100644 index 00000000000..142ad9a745d --- /dev/null +++ b/Chronicle/src/V1/FilterOperatorAndValues.php @@ -0,0 +1,107 @@ +google.cloud.chronicle.v1.FilterOperatorAndValues + */ +class FilterOperatorAndValues extends \Google\Protobuf\Internal\Message +{ + /** + * Operator for a single filter modifier. + * + * Generated from protobuf field .google.cloud.chronicle.v1.FilterOperator filter_operator = 1; + */ + protected $filter_operator = 0; + /** + * Values for the modifier. All operators should have a single value other + * than 'IN' and 'BETWEEN'. 'PAST' will have negative seconds + * like -86400 is past 1 day. + * + * Generated from protobuf field repeated string field_values = 2; + */ + private $field_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $filter_operator + * Operator for a single filter modifier. + * @type string[] $field_values + * Values for the modifier. All operators should have a single value other + * than 'IN' and 'BETWEEN'. 'PAST' will have negative seconds + * like -86400 is past 1 day. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * Operator for a single filter modifier. + * + * Generated from protobuf field .google.cloud.chronicle.v1.FilterOperator filter_operator = 1; + * @return int + */ + public function getFilterOperator() + { + return $this->filter_operator; + } + + /** + * Operator for a single filter modifier. + * + * Generated from protobuf field .google.cloud.chronicle.v1.FilterOperator filter_operator = 1; + * @param int $var + * @return $this + */ + public function setFilterOperator($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\FilterOperator::class); + $this->filter_operator = $var; + + return $this; + } + + /** + * Values for the modifier. All operators should have a single value other + * than 'IN' and 'BETWEEN'. 'PAST' will have negative seconds + * like -86400 is past 1 day. + * + * Generated from protobuf field repeated string field_values = 2; + * @return RepeatedField + */ + public function getFieldValues() + { + return $this->field_values; + } + + /** + * Values for the modifier. All operators should have a single value other + * than 'IN' and 'BETWEEN'. 'PAST' will have negative seconds + * like -86400 is past 1 day. + * + * Generated from protobuf field repeated string field_values = 2; + * @param string[] $var + * @return $this + */ + public function setFieldValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->field_values = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/GetBigQueryExportRequest.php b/Chronicle/src/V1/GetBigQueryExportRequest.php new file mode 100644 index 00000000000..b95f81e655d --- /dev/null +++ b/Chronicle/src/V1/GetBigQueryExportRequest.php @@ -0,0 +1,91 @@ +google.cloud.chronicle.v1.GetBigQueryExportRequest + */ +class GetBigQueryExportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the BigqueryExport to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/bigQueryExport + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the BigqueryExport to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/bigQueryExport + * Please see {@see BigQueryExportServiceClient::bigQueryExportName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\GetBigQueryExportRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the BigqueryExport to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/bigQueryExport + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\BigQueryExport::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the BigqueryExport to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/bigQueryExport + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the BigqueryExport to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/bigQueryExport + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/GetDashboardChartRequest.php b/Chronicle/src/V1/GetDashboardChartRequest.php new file mode 100644 index 00000000000..11a3b7ba09f --- /dev/null +++ b/Chronicle/src/V1/GetDashboardChartRequest.php @@ -0,0 +1,91 @@ +google.cloud.chronicle.v1.GetDashboardChartRequest + */ +class GetDashboardChartRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the dashboardChart to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the dashboardChart to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart} + * Please see {@see DashboardChartServiceClient::dashboardChartName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\GetDashboardChartRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the dashboardChart to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the dashboardChart to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the dashboardChart to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/GetDashboardQueryRequest.php b/Chronicle/src/V1/GetDashboardQueryRequest.php new file mode 100644 index 00000000000..0c607fe266f --- /dev/null +++ b/Chronicle/src/V1/GetDashboardQueryRequest.php @@ -0,0 +1,91 @@ +google.cloud.chronicle.v1.GetDashboardQueryRequest + */ +class GetDashboardQueryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the dashboardQuery to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the dashboardQuery to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query} + * Please see {@see DashboardQueryServiceClient::dashboardQueryName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\GetDashboardQueryRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the dashboardQuery to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the dashboardQuery to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the dashboardQuery to retrieve. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/GetFeaturedContentNativeDashboardRequest.php b/Chronicle/src/V1/GetFeaturedContentNativeDashboardRequest.php new file mode 100644 index 00000000000..7a4ee8ab015 --- /dev/null +++ b/Chronicle/src/V1/GetFeaturedContentNativeDashboardRequest.php @@ -0,0 +1,91 @@ +google.cloud.chronicle.v1.GetFeaturedContentNativeDashboardRequest + */ +class GetFeaturedContentNativeDashboardRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the FeaturedContentNativeDashboard to + * retrieve. Format: + * projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the FeaturedContentNativeDashboard to + * retrieve. Format: + * projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard} + * Please see {@see FeaturedContentNativeDashboardServiceClient::featuredContentNativeDashboardName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\GetFeaturedContentNativeDashboardRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the FeaturedContentNativeDashboard to + * retrieve. Format: + * projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\FeaturedContentNativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the FeaturedContentNativeDashboard to + * retrieve. Format: + * projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the FeaturedContentNativeDashboard to + * retrieve. Format: + * projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/GetNativeDashboardRequest.php b/Chronicle/src/V1/GetNativeDashboardRequest.php new file mode 100644 index 00000000000..e637b5b6f21 --- /dev/null +++ b/Chronicle/src/V1/GetNativeDashboardRequest.php @@ -0,0 +1,129 @@ +google.cloud.chronicle.v1.GetNativeDashboardRequest + */ +class GetNativeDashboardRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The dashboard name to fetch. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. View indicates the scope of fields to populate when returning the + * dashboard resource. If unspecified, defaults to the basic view. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboardView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $name Required. The dashboard name to fetch. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * Please see {@see NativeDashboardServiceClient::nativeDashboardName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\GetNativeDashboardRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The dashboard name to fetch. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * @type int $view + * Optional. View indicates the scope of fields to populate when returning the + * dashboard resource. If unspecified, defaults to the basic view. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Required. The dashboard name to fetch. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The dashboard name to fetch. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. View indicates the scope of fields to populate when returning the + * dashboard resource. If unspecified, defaults to the basic view. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboardView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. View indicates the scope of fields to populate when returning the + * dashboard resource. If unspecified, defaults to the basic view. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboardView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\NativeDashboardView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/ImportExportStatus.php b/Chronicle/src/V1/ImportExportStatus.php new file mode 100644 index 00000000000..f671e484e6d --- /dev/null +++ b/Chronicle/src/V1/ImportExportStatus.php @@ -0,0 +1,111 @@ +google.cloud.chronicle.v1.ImportExportStatus + */ +class ImportExportStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the dashboard if it was supplied in the request. + * + * Generated from protobuf field string dashboard = 1; + */ + protected $dashboard = ''; + /** + * Output only. Status of the import/export operation. + * + * Generated from protobuf field .google.rpc.Status status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dashboard + * The resource name of the dashboard if it was supplied in the request. + * @type \Google\Rpc\Status $status + * Output only. Status of the import/export operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the dashboard if it was supplied in the request. + * + * Generated from protobuf field string dashboard = 1; + * @return string + */ + public function getDashboard() + { + return $this->dashboard; + } + + /** + * The resource name of the dashboard if it was supplied in the request. + * + * Generated from protobuf field string dashboard = 1; + * @param string $var + * @return $this + */ + public function setDashboard($var) + { + GPBUtil::checkString($var, True); + $this->dashboard = $var; + + return $this; + } + + /** + * Output only. Status of the import/export operation. + * + * Generated from protobuf field .google.rpc.Status status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * Output only. Status of the import/export operation. + * + * Generated from protobuf field .google.rpc.Status status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->status = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/ImportNativeDashboardsInlineSource.php b/Chronicle/src/V1/ImportNativeDashboardsInlineSource.php new file mode 100644 index 00000000000..731274371bb --- /dev/null +++ b/Chronicle/src/V1/ImportNativeDashboardsInlineSource.php @@ -0,0 +1,67 @@ +google.cloud.chronicle.v1.ImportNativeDashboardsInlineSource + */ +class ImportNativeDashboardsInlineSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Dashboards with charts and queries. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueries dashboards = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $dashboards; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\NativeDashboardWithChartsAndQueries[] $dashboards + * Required. Dashboards with charts and queries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Required. Dashboards with charts and queries. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueries dashboards = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\NativeDashboardWithChartsAndQueries> + */ + public function getDashboards() + { + return $this->dashboards; + } + + /** + * Required. Dashboards with charts and queries. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueries dashboards = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\NativeDashboardWithChartsAndQueries[] $var + * @return $this + */ + public function setDashboards($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\NativeDashboardWithChartsAndQueries::class); + $this->dashboards = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/ImportNativeDashboardsRequest.php b/Chronicle/src/V1/ImportNativeDashboardsRequest.php new file mode 100644 index 00000000000..19dad270814 --- /dev/null +++ b/Chronicle/src/V1/ImportNativeDashboardsRequest.php @@ -0,0 +1,132 @@ +google.cloud.chronicle.v1.ImportNativeDashboardsRequest + */ +class ImportNativeDashboardsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this dashboard will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The data will imported from this proto. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ImportNativeDashboardsInlineSource source = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source = null; + + /** + * @param string $parent Required. The parent resource where this dashboard will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * Please see {@see NativeDashboardServiceClient::instanceName()} for help formatting this field. + * @param \Google\Cloud\Chronicle\V1\ImportNativeDashboardsInlineSource $source Required. The data will imported from this proto. + * + * @return \Google\Cloud\Chronicle\V1\ImportNativeDashboardsRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Chronicle\V1\ImportNativeDashboardsInlineSource $source): self + { + return (new self()) + ->setParent($parent) + ->setSource($source); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this dashboard will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * @type \Google\Cloud\Chronicle\V1\ImportNativeDashboardsInlineSource $source + * Required. The data will imported from this proto. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this dashboard will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where this dashboard will be created. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The data will imported from this proto. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ImportNativeDashboardsInlineSource source = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\ImportNativeDashboardsInlineSource|null + */ + public function getSource() + { + return $this->source; + } + + public function hasSource() + { + return isset($this->source); + } + + public function clearSource() + { + unset($this->source); + } + + /** + * Required. The data will imported from this proto. + * + * Generated from protobuf field .google.cloud.chronicle.v1.ImportNativeDashboardsInlineSource source = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\ImportNativeDashboardsInlineSource $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\ImportNativeDashboardsInlineSource::class); + $this->source = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/ImportNativeDashboardsResponse.php b/Chronicle/src/V1/ImportNativeDashboardsResponse.php new file mode 100644 index 00000000000..a89d2e54dbd --- /dev/null +++ b/Chronicle/src/V1/ImportNativeDashboardsResponse.php @@ -0,0 +1,91 @@ +google.cloud.chronicle.v1.ImportNativeDashboardsResponse + */ +class ImportNativeDashboardsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Represents the status of an import operation for multiple + * dashboards. Each dashboard's import status is tracked. A status of OK + * indicates the dashboard was ready for import. Otherwise, an appropriate + * error code and message are provided. Importantly, the import process is + * all-or-nothing: if even one dashboard fails to import, the entire import + * operation is aborted, and none of the dashboards are imported. The order of + * the statuses will be the same as in the import request. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.ImportExportStatus results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\ImportExportStatus[] $results + * Output only. Represents the status of an import operation for multiple + * dashboards. Each dashboard's import status is tracked. A status of OK + * indicates the dashboard was ready for import. Otherwise, an appropriate + * error code and message are provided. Importantly, the import process is + * all-or-nothing: if even one dashboard fails to import, the entire import + * operation is aborted, and none of the dashboards are imported. The order of + * the statuses will be the same as in the import request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Represents the status of an import operation for multiple + * dashboards. Each dashboard's import status is tracked. A status of OK + * indicates the dashboard was ready for import. Otherwise, an appropriate + * error code and message are provided. Importantly, the import process is + * all-or-nothing: if even one dashboard fails to import, the entire import + * operation is aborted, and none of the dashboards are imported. The order of + * the statuses will be the same as in the import request. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.ImportExportStatus results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\ImportExportStatus> + */ + public function getResults() + { + return $this->results; + } + + /** + * Output only. Represents the status of an import operation for multiple + * dashboards. Each dashboard's import status is tracked. A status of OK + * indicates the dashboard was ready for import. Otherwise, an appropriate + * error code and message are provided. Importantly, the import process is + * all-or-nothing: if even one dashboard fails to import, the entire import + * operation is aborted, and none of the dashboards are imported. The order of + * the statuses will be the same as in the import request. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.ImportExportStatus results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Chronicle\V1\ImportExportStatus[] $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\ImportExportStatus::class); + $this->results = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/InAppLink.php b/Chronicle/src/V1/InAppLink.php new file mode 100644 index 00000000000..c3a7107895a --- /dev/null +++ b/Chronicle/src/V1/InAppLink.php @@ -0,0 +1,135 @@ +google.cloud.chronicle.v1.InAppLink + */ +class InAppLink extends \Google\Protobuf\Internal\Message +{ + /** + * URL to redirect to. + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + /** + * Label for the link. + * + * Generated from protobuf field string label = 2; + */ + protected $label = ''; + /** + * Icon url for the link. + * + * Generated from protobuf field string icon_url = 3; + */ + protected $icon_url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * URL to redirect to. + * @type string $label + * Label for the link. + * @type string $icon_url + * Icon url for the link. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * URL to redirect to. + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * URL to redirect to. + * + * Generated from protobuf field string url = 1; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * Label for the link. + * + * Generated from protobuf field string label = 2; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Label for the link. + * + * Generated from protobuf field string label = 2; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * Icon url for the link. + * + * Generated from protobuf field string icon_url = 3; + * @return string + */ + public function getIconUrl() + { + return $this->icon_url; + } + + /** + * Icon url for the link. + * + * Generated from protobuf field string icon_url = 3; + * @param string $var + * @return $this + */ + public function setIconUrl($var) + { + GPBUtil::checkString($var, True); + $this->icon_url = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/InlineDestination.php b/Chronicle/src/V1/InlineDestination.php new file mode 100644 index 00000000000..866b74665fd --- /dev/null +++ b/Chronicle/src/V1/InlineDestination.php @@ -0,0 +1,67 @@ +google.cloud.chronicle.v1.InlineDestination + */ +class InlineDestination extends \Google\Protobuf\Internal\Message +{ + /** + * Dashboards with charts and queries. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueries dashboards = 1; + */ + private $dashboards; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\NativeDashboardWithChartsAndQueries[] $dashboards + * Dashboards with charts and queries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Dashboards with charts and queries. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueries dashboards = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\NativeDashboardWithChartsAndQueries> + */ + public function getDashboards() + { + return $this->dashboards; + } + + /** + * Dashboards with charts and queries. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueries dashboards = 1; + * @param \Google\Cloud\Chronicle\V1\NativeDashboardWithChartsAndQueries[] $var + * @return $this + */ + public function setDashboards($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\NativeDashboardWithChartsAndQueries::class); + $this->dashboards = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/InstallFeaturedContentNativeDashboardRequest.php b/Chronicle/src/V1/InstallFeaturedContentNativeDashboardRequest.php new file mode 100644 index 00000000000..2b0c1a42587 --- /dev/null +++ b/Chronicle/src/V1/InstallFeaturedContentNativeDashboardRequest.php @@ -0,0 +1,135 @@ +google.cloud.chronicle.v1.InstallFeaturedContentNativeDashboardRequest + */ +class InstallFeaturedContentNativeDashboardRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the FeaturedContentNativeDashboard to + * install. Format: + * projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The FeaturedContentNativeDashboard to install. + * + * Generated from protobuf field .google.cloud.chronicle.v1.FeaturedContentNativeDashboard featured_content_native_dashboard = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $featured_content_native_dashboard = null; + + /** + * @param string $name Required. The resource name of the FeaturedContentNativeDashboard to + * install. Format: + * projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard} + * Please see {@see FeaturedContentNativeDashboardServiceClient::featuredContentNativeDashboardName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\InstallFeaturedContentNativeDashboardRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the FeaturedContentNativeDashboard to + * install. Format: + * projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard} + * @type \Google\Cloud\Chronicle\V1\FeaturedContentNativeDashboard $featured_content_native_dashboard + * Optional. The FeaturedContentNativeDashboard to install. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\FeaturedContentNativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the FeaturedContentNativeDashboard to + * install. Format: + * projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the FeaturedContentNativeDashboard to + * install. Format: + * projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The FeaturedContentNativeDashboard to install. + * + * Generated from protobuf field .google.cloud.chronicle.v1.FeaturedContentNativeDashboard featured_content_native_dashboard = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\FeaturedContentNativeDashboard|null + */ + public function getFeaturedContentNativeDashboard() + { + return $this->featured_content_native_dashboard; + } + + public function hasFeaturedContentNativeDashboard() + { + return isset($this->featured_content_native_dashboard); + } + + public function clearFeaturedContentNativeDashboard() + { + unset($this->featured_content_native_dashboard); + } + + /** + * Optional. The FeaturedContentNativeDashboard to install. + * + * Generated from protobuf field .google.cloud.chronicle.v1.FeaturedContentNativeDashboard featured_content_native_dashboard = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\FeaturedContentNativeDashboard $var + * @return $this + */ + public function setFeaturedContentNativeDashboard($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\FeaturedContentNativeDashboard::class); + $this->featured_content_native_dashboard = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/InstallFeaturedContentNativeDashboardResponse.php b/Chronicle/src/V1/InstallFeaturedContentNativeDashboardResponse.php new file mode 100644 index 00000000000..5571fee0f8f --- /dev/null +++ b/Chronicle/src/V1/InstallFeaturedContentNativeDashboardResponse.php @@ -0,0 +1,75 @@ +google.cloud.chronicle.v1.InstallFeaturedContentNativeDashboardResponse + */ +class InstallFeaturedContentNativeDashboardResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The resource name of the NativeDashboard created. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{native_dashboard_id} + * + * Generated from protobuf field string native_dashboard = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $native_dashboard = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $native_dashboard + * Optional. The resource name of the NativeDashboard created. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{native_dashboard_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\FeaturedContentNativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The resource name of the NativeDashboard created. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{native_dashboard_id} + * + * Generated from protobuf field string native_dashboard = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getNativeDashboard() + { + return $this->native_dashboard; + } + + /** + * Optional. The resource name of the NativeDashboard created. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{native_dashboard_id} + * + * Generated from protobuf field string native_dashboard = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNativeDashboard($var) + { + GPBUtil::checkString($var, True); + $this->native_dashboard = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/LanguageFeature.php b/Chronicle/src/V1/LanguageFeature.php new file mode 100644 index 00000000000..60f00ada61c --- /dev/null +++ b/Chronicle/src/V1/LanguageFeature.php @@ -0,0 +1,70 @@ +google.cloud.chronicle.v1.LanguageFeature + */ +class LanguageFeature +{ + /** + * Language feature is unknown. + * + * Generated from protobuf enum LANGUAGE_FEATURE_UNSPECIFIED = 0; + */ + const LANGUAGE_FEATURE_UNSPECIFIED = 0; + /** + * Language feature is joins. + * + * Generated from protobuf enum JOINS = 1; + */ + const JOINS = 1; + /** + * Language feature is stages. + * + * Generated from protobuf enum STAGES = 2; + */ + const STAGES = 2; + /** + * Language feature is data table. + * + * Generated from protobuf enum DATA_TABLES = 3; + */ + const DATA_TABLES = 3; + + private static $valueToName = [ + self::LANGUAGE_FEATURE_UNSPECIFIED => 'LANGUAGE_FEATURE_UNSPECIFIED', + self::JOINS => 'JOINS', + self::STAGES => 'STAGES', + self::DATA_TABLES => 'DATA_TABLES', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/LatestExportJobState.php b/Chronicle/src/V1/LatestExportJobState.php new file mode 100644 index 00000000000..917a94a9f71 --- /dev/null +++ b/Chronicle/src/V1/LatestExportJobState.php @@ -0,0 +1,61 @@ +google.cloud.chronicle.v1.LatestExportJobState + */ +class LatestExportJobState +{ + /** + * The latest export job state is unspecified. + * + * Generated from protobuf enum LATEST_EXPORT_JOB_STATE_UNSPECIFIED = 0; + */ + const LATEST_EXPORT_JOB_STATE_UNSPECIFIED = 0; + /** + * The latest export job state is successful. + * + * Generated from protobuf enum LATEST_EXPORT_JOB_STATE_SUCCESS = 1; + */ + const LATEST_EXPORT_JOB_STATE_SUCCESS = 1; + /** + * The latest export job state is failed. + * + * Generated from protobuf enum LATEST_EXPORT_JOB_STATE_FAILED = 2; + */ + const LATEST_EXPORT_JOB_STATE_FAILED = 2; + + private static $valueToName = [ + self::LATEST_EXPORT_JOB_STATE_UNSPECIFIED => 'LATEST_EXPORT_JOB_STATE_UNSPECIFIED', + self::LATEST_EXPORT_JOB_STATE_SUCCESS => 'LATEST_EXPORT_JOB_STATE_SUCCESS', + self::LATEST_EXPORT_JOB_STATE_FAILED => 'LATEST_EXPORT_JOB_STATE_FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/LegendAlign.php b/Chronicle/src/V1/LegendAlign.php new file mode 100644 index 00000000000..a850d2d49de --- /dev/null +++ b/Chronicle/src/V1/LegendAlign.php @@ -0,0 +1,58 @@ +google.cloud.chronicle.v1.LegendAlign + */ +class LegendAlign +{ + /** + * Generated from protobuf enum LEGEND_ALIGN_UNSPECIFIED = 0; + */ + const LEGEND_ALIGN_UNSPECIFIED = 0; + /** + * Generated from protobuf enum AUTO = 1; + */ + const AUTO = 1; + /** + * Generated from protobuf enum LEFT = 2; + */ + const LEFT = 2; + /** + * Generated from protobuf enum RIGHT = 3; + */ + const RIGHT = 3; + + private static $valueToName = [ + self::LEGEND_ALIGN_UNSPECIFIED => 'LEGEND_ALIGN_UNSPECIFIED', + self::AUTO => 'AUTO', + self::LEFT => 'LEFT', + self::RIGHT => 'RIGHT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/LegendOrient.php b/Chronicle/src/V1/LegendOrient.php new file mode 100644 index 00000000000..4a62d42e57b --- /dev/null +++ b/Chronicle/src/V1/LegendOrient.php @@ -0,0 +1,53 @@ +google.cloud.chronicle.v1.LegendOrient + */ +class LegendOrient +{ + /** + * Generated from protobuf enum LEGEND_ORIENT_UNSPECIFIED = 0; + */ + const LEGEND_ORIENT_UNSPECIFIED = 0; + /** + * Generated from protobuf enum VERTICAL = 1; + */ + const VERTICAL = 1; + /** + * Generated from protobuf enum HORIZONTAL = 2; + */ + const HORIZONTAL = 2; + + private static $valueToName = [ + self::LEGEND_ORIENT_UNSPECIFIED => 'LEGEND_ORIENT_UNSPECIFIED', + self::VERTICAL => 'VERTICAL', + self::HORIZONTAL => 'HORIZONTAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/ListFeaturedContentNativeDashboardsRequest.php b/Chronicle/src/V1/ListFeaturedContentNativeDashboardsRequest.php new file mode 100644 index 00000000000..85bffca5276 --- /dev/null +++ b/Chronicle/src/V1/ListFeaturedContentNativeDashboardsRequest.php @@ -0,0 +1,277 @@ +google.cloud.chronicle.v1.ListFeaturedContentNativeDashboardsRequest + */ +class ListFeaturedContentNativeDashboardsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of + * FeaturedContentNativeDashboards. Format: + * projects/{project}/locations/{location}/instances/{instance}/contentHub + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of FeaturedContentNativeDashboards to return. + * The service may return fewer than this value. If unspecified, at most 100 + * FeaturedContentNativeDashboards will be returned. The maximum value is 100; + * values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous + * `ListFeaturedContentNativeDashboards` call. Provide this to retrieve the + * subsequent page. + * When paginating, all other parameters provided to + * `ListFeaturedContentNativeDashboards` must match the call that provided the + * page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. The filter to apply to list the FeaturedContentNativeDashboards. + * The filter syntax follows Google Cloud syntax: https://google.aip.dev/160. + * Supported fields for filtering: + * * `name`: The resource name of the featured content. + * * `content_metadata.description`: The description of the featured + * content. + * When a literal value is provided without a field, it will perform a + * substring search across both `name` and `content_metadata.description`. + * Examples: + * * `"test"`: Matches featured content where either the name or description + * contains "test" as a substring. + * * `name="test"`: Matches featured content where the name contains "test". + * * `content_metadata.description="test"`: Matches featured content where + * the description contains "test". + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of + * FeaturedContentNativeDashboards. Format: + * projects/{project}/locations/{location}/instances/{instance}/contentHub + * Please see {@see FeaturedContentNativeDashboardServiceClient::contentHubName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\ListFeaturedContentNativeDashboardsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of + * FeaturedContentNativeDashboards. Format: + * projects/{project}/locations/{location}/instances/{instance}/contentHub + * @type int $page_size + * Optional. The maximum number of FeaturedContentNativeDashboards to return. + * The service may return fewer than this value. If unspecified, at most 100 + * FeaturedContentNativeDashboards will be returned. The maximum value is 100; + * values above 100 will be coerced to 100. + * @type string $page_token + * Optional. A page token, received from a previous + * `ListFeaturedContentNativeDashboards` call. Provide this to retrieve the + * subsequent page. + * When paginating, all other parameters provided to + * `ListFeaturedContentNativeDashboards` must match the call that provided the + * page token. + * @type string $filter + * Optional. The filter to apply to list the FeaturedContentNativeDashboards. + * The filter syntax follows Google Cloud syntax: https://google.aip.dev/160. + * Supported fields for filtering: + * * `name`: The resource name of the featured content. + * * `content_metadata.description`: The description of the featured + * content. + * When a literal value is provided without a field, it will perform a + * substring search across both `name` and `content_metadata.description`. + * Examples: + * * `"test"`: Matches featured content where either the name or description + * contains "test" as a substring. + * * `name="test"`: Matches featured content where the name contains "test". + * * `content_metadata.description="test"`: Matches featured content where + * the description contains "test". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\FeaturedContentNativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of + * FeaturedContentNativeDashboards. Format: + * projects/{project}/locations/{location}/instances/{instance}/contentHub + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of + * FeaturedContentNativeDashboards. Format: + * projects/{project}/locations/{location}/instances/{instance}/contentHub + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of FeaturedContentNativeDashboards to return. + * The service may return fewer than this value. If unspecified, at most 100 + * FeaturedContentNativeDashboards will be returned. The maximum value is 100; + * values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of FeaturedContentNativeDashboards to return. + * The service may return fewer than this value. If unspecified, at most 100 + * FeaturedContentNativeDashboards will be returned. The maximum value is 100; + * values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous + * `ListFeaturedContentNativeDashboards` call. Provide this to retrieve the + * subsequent page. + * When paginating, all other parameters provided to + * `ListFeaturedContentNativeDashboards` must match the call that provided the + * page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous + * `ListFeaturedContentNativeDashboards` call. Provide this to retrieve the + * subsequent page. + * When paginating, all other parameters provided to + * `ListFeaturedContentNativeDashboards` must match the call that provided the + * page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter to apply to list the FeaturedContentNativeDashboards. + * The filter syntax follows Google Cloud syntax: https://google.aip.dev/160. + * Supported fields for filtering: + * * `name`: The resource name of the featured content. + * * `content_metadata.description`: The description of the featured + * content. + * When a literal value is provided without a field, it will perform a + * substring search across both `name` and `content_metadata.description`. + * Examples: + * * `"test"`: Matches featured content where either the name or description + * contains "test" as a substring. + * * `name="test"`: Matches featured content where the name contains "test". + * * `content_metadata.description="test"`: Matches featured content where + * the description contains "test". + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter to apply to list the FeaturedContentNativeDashboards. + * The filter syntax follows Google Cloud syntax: https://google.aip.dev/160. + * Supported fields for filtering: + * * `name`: The resource name of the featured content. + * * `content_metadata.description`: The description of the featured + * content. + * When a literal value is provided without a field, it will perform a + * substring search across both `name` and `content_metadata.description`. + * Examples: + * * `"test"`: Matches featured content where either the name or description + * contains "test" as a substring. + * * `name="test"`: Matches featured content where the name contains "test". + * * `content_metadata.description="test"`: Matches featured content where + * the description contains "test". + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/ListFeaturedContentNativeDashboardsResponse.php b/Chronicle/src/V1/ListFeaturedContentNativeDashboardsResponse.php new file mode 100644 index 00000000000..8258ec2f548 --- /dev/null +++ b/Chronicle/src/V1/ListFeaturedContentNativeDashboardsResponse.php @@ -0,0 +1,109 @@ +google.cloud.chronicle.v1.ListFeaturedContentNativeDashboardsResponse + */ +class ListFeaturedContentNativeDashboardsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of FeaturedContentNativeDashboards. + * Ordered by name by default. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.FeaturedContentNativeDashboard featured_content_native_dashboards = 1; + */ + private $featured_content_native_dashboards; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\FeaturedContentNativeDashboard[] $featured_content_native_dashboards + * The list of FeaturedContentNativeDashboards. + * Ordered by name by default. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\FeaturedContentNativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * The list of FeaturedContentNativeDashboards. + * Ordered by name by default. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.FeaturedContentNativeDashboard featured_content_native_dashboards = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\FeaturedContentNativeDashboard> + */ + public function getFeaturedContentNativeDashboards() + { + return $this->featured_content_native_dashboards; + } + + /** + * The list of FeaturedContentNativeDashboards. + * Ordered by name by default. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.FeaturedContentNativeDashboard featured_content_native_dashboards = 1; + * @param \Google\Cloud\Chronicle\V1\FeaturedContentNativeDashboard[] $var + * @return $this + */ + public function setFeaturedContentNativeDashboards($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\FeaturedContentNativeDashboard::class); + $this->featured_content_native_dashboards = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/ListNativeDashboardsRequest.php b/Chronicle/src/V1/ListNativeDashboardsRequest.php new file mode 100644 index 00000000000..19e90d6b59d --- /dev/null +++ b/Chronicle/src/V1/ListNativeDashboardsRequest.php @@ -0,0 +1,208 @@ +google.cloud.chronicle.v1.ListNativeDashboardsRequest + */ +class ListNativeDashboardsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent owning this dashboard collection. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of dashboards to return. The service may + * return fewer than this value. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListDashboards` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDashboards` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. View indicates the scope of fields to populate when returning the + * dashboard resource. If unspecified, defaults to the basic view. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboardView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $parent Required. The parent owning this dashboard collection. + * Format: projects/{project}/locations/{location}/instances/{instance} + * Please see {@see NativeDashboardServiceClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\ListNativeDashboardsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent owning this dashboard collection. + * Format: projects/{project}/locations/{location}/instances/{instance} + * @type int $page_size + * Optional. The maximum number of dashboards to return. The service may + * return fewer than this value. + * @type string $page_token + * Optional. A page token, received from a previous `ListDashboards` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDashboards` must + * match the call that provided the page token. + * @type int $view + * Optional. View indicates the scope of fields to populate when returning the + * dashboard resource. If unspecified, defaults to the basic view. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent owning this dashboard collection. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent owning this dashboard collection. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of dashboards to return. The service may + * return fewer than this value. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of dashboards to return. The service may + * return fewer than this value. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListDashboards` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDashboards` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListDashboards` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDashboards` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. View indicates the scope of fields to populate when returning the + * dashboard resource. If unspecified, defaults to the basic view. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboardView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. View indicates the scope of fields to populate when returning the + * dashboard resource. If unspecified, defaults to the basic view. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboardView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\NativeDashboardView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/ListNativeDashboardsResponse.php b/Chronicle/src/V1/ListNativeDashboardsResponse.php new file mode 100644 index 00000000000..1284ba4e0a8 --- /dev/null +++ b/Chronicle/src/V1/ListNativeDashboardsResponse.php @@ -0,0 +1,105 @@ +google.cloud.chronicle.v1.ListNativeDashboardsResponse + */ +class ListNativeDashboardsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The dashboards from the specified chronicle instance. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.NativeDashboard native_dashboards = 1; + */ + private $native_dashboards; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\NativeDashboard[] $native_dashboards + * The dashboards from the specified chronicle instance. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * The dashboards from the specified chronicle instance. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.NativeDashboard native_dashboards = 1; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\NativeDashboard> + */ + public function getNativeDashboards() + { + return $this->native_dashboards; + } + + /** + * The dashboards from the specified chronicle instance. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.NativeDashboard native_dashboards = 1; + * @param \Google\Cloud\Chronicle\V1\NativeDashboard[] $var + * @return $this + */ + public function setNativeDashboards($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\NativeDashboard::class); + $this->native_dashboards = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/Markdown.php b/Chronicle/src/V1/Markdown.php new file mode 100644 index 00000000000..9749a826c42 --- /dev/null +++ b/Chronicle/src/V1/Markdown.php @@ -0,0 +1,111 @@ +google.cloud.chronicle.v1.Markdown + */ +class Markdown extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Markdown content. + * + * Generated from protobuf field string content = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $content = ''; + /** + * Optional. Properties for the markdown. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Markdown.MarkdownProperties properties = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $properties = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $content + * Required. Markdown content. + * @type \Google\Cloud\Chronicle\V1\Markdown\MarkdownProperties $properties + * Optional. Properties for the markdown. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Required. Markdown content. + * + * Generated from protobuf field string content = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Required. Markdown content. + * + * Generated from protobuf field string content = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + + /** + * Optional. Properties for the markdown. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Markdown.MarkdownProperties properties = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\Markdown\MarkdownProperties|null + */ + public function getProperties() + { + return $this->properties; + } + + public function hasProperties() + { + return isset($this->properties); + } + + public function clearProperties() + { + unset($this->properties); + } + + /** + * Optional. Properties for the markdown. + * + * Generated from protobuf field .google.cloud.chronicle.v1.Markdown.MarkdownProperties properties = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\Markdown\MarkdownProperties $var + * @return $this + */ + public function setProperties($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\Markdown\MarkdownProperties::class); + $this->properties = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/Markdown/MarkdownProperties.php b/Chronicle/src/V1/Markdown/MarkdownProperties.php new file mode 100644 index 00000000000..d9de9725ab3 --- /dev/null +++ b/Chronicle/src/V1/Markdown/MarkdownProperties.php @@ -0,0 +1,67 @@ +google.cloud.chronicle.v1.Markdown.MarkdownProperties + */ +class MarkdownProperties extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Background color of the markdown. + * + * Generated from protobuf field string background_color = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $background_color = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $background_color + * Optional. Background color of the markdown. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardChart::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Background color of the markdown. + * + * Generated from protobuf field string background_color = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBackgroundColor() + { + return $this->background_color; + } + + /** + * Optional. Background color of the markdown. + * + * Generated from protobuf field string background_color = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBackgroundColor($var) + { + GPBUtil::checkString($var, True); + $this->background_color = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/MetricDisplayTrend.php b/Chronicle/src/V1/MetricDisplayTrend.php new file mode 100644 index 00000000000..cf9521d4e2e --- /dev/null +++ b/Chronicle/src/V1/MetricDisplayTrend.php @@ -0,0 +1,68 @@ +google.cloud.chronicle.v1.MetricDisplayTrend + */ +class MetricDisplayTrend +{ + /** + * Trend is not specified. + * + * Generated from protobuf enum METRIC_DISPLAY_TREND_UNSPECIFIED = 0; + */ + const METRIC_DISPLAY_TREND_UNSPECIFIED = 0; + /** + * Trend data in absolute value + * + * Generated from protobuf enum METRIC_DISPLAY_TREND_ABSOLUTE_VALUE = 2; + */ + const METRIC_DISPLAY_TREND_ABSOLUTE_VALUE = 2; + /** + * Trend data in percentage + * + * Generated from protobuf enum METRIC_DISPLAY_TREND_PERCENTAGE = 3; + */ + const METRIC_DISPLAY_TREND_PERCENTAGE = 3; + /** + * Trend data in both absolute value and percentage + * + * Generated from protobuf enum METRIC_DISPLAY_TREND_ABSOLUTE_VALUE_AND_PERCENTAGE = 4; + */ + const METRIC_DISPLAY_TREND_ABSOLUTE_VALUE_AND_PERCENTAGE = 4; + + private static $valueToName = [ + self::METRIC_DISPLAY_TREND_UNSPECIFIED => 'METRIC_DISPLAY_TREND_UNSPECIFIED', + self::METRIC_DISPLAY_TREND_ABSOLUTE_VALUE => 'METRIC_DISPLAY_TREND_ABSOLUTE_VALUE', + self::METRIC_DISPLAY_TREND_PERCENTAGE => 'METRIC_DISPLAY_TREND_PERCENTAGE', + self::METRIC_DISPLAY_TREND_ABSOLUTE_VALUE_AND_PERCENTAGE => 'METRIC_DISPLAY_TREND_ABSOLUTE_VALUE_AND_PERCENTAGE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/MetricFormat.php b/Chronicle/src/V1/MetricFormat.php new file mode 100644 index 00000000000..b7e1c16c928 --- /dev/null +++ b/Chronicle/src/V1/MetricFormat.php @@ -0,0 +1,61 @@ +google.cloud.chronicle.v1.MetricFormat + */ +class MetricFormat +{ + /** + * Metric format is not specified. + * + * Generated from protobuf enum METRIC_FORMAT_UNSPECIFIED = 0; + */ + const METRIC_FORMAT_UNSPECIFIED = 0; + /** + * Metric format in number + * + * Generated from protobuf enum METRIC_FORMAT_NUMBER = 1; + */ + const METRIC_FORMAT_NUMBER = 1; + /** + * Metric format in plain text + * + * Generated from protobuf enum METRIC_FORMAT_PLAIN_TEXT = 2; + */ + const METRIC_FORMAT_PLAIN_TEXT = 2; + + private static $valueToName = [ + self::METRIC_FORMAT_UNSPECIFIED => 'METRIC_FORMAT_UNSPECIFIED', + self::METRIC_FORMAT_NUMBER => 'METRIC_FORMAT_NUMBER', + self::METRIC_FORMAT_PLAIN_TEXT => 'METRIC_FORMAT_PLAIN_TEXT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/MetricTrendType.php b/Chronicle/src/V1/MetricTrendType.php new file mode 100644 index 00000000000..20a0f130035 --- /dev/null +++ b/Chronicle/src/V1/MetricTrendType.php @@ -0,0 +1,61 @@ +google.cloud.chronicle.v1.MetricTrendType + */ +class MetricTrendType +{ + /** + * Trend type is not specified. + * + * Generated from protobuf enum METRIC_TREND_TYPE_UNSPECIFIED = 0; + */ + const METRIC_TREND_TYPE_UNSPECIFIED = 0; + /** + * The trend type is regular(green for positive delta) + * + * Generated from protobuf enum METRIC_TREND_TYPE_REGULAR = 1; + */ + const METRIC_TREND_TYPE_REGULAR = 1; + /** + * The trend type is inverse(red for positive delta) + * + * Generated from protobuf enum METRIC_TREND_TYPE_INVERSE = 2; + */ + const METRIC_TREND_TYPE_INVERSE = 2; + + private static $valueToName = [ + self::METRIC_TREND_TYPE_UNSPECIFIED => 'METRIC_TREND_TYPE_UNSPECIFIED', + self::METRIC_TREND_TYPE_REGULAR => 'METRIC_TREND_TYPE_REGULAR', + self::METRIC_TREND_TYPE_INVERSE => 'METRIC_TREND_TYPE_INVERSE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/NativeDashboard.php b/Chronicle/src/V1/NativeDashboard.php new file mode 100644 index 00000000000..3968678c635 --- /dev/null +++ b/Chronicle/src/V1/NativeDashboard.php @@ -0,0 +1,493 @@ +google.cloud.chronicle.v1.NativeDashboard + */ +class NativeDashboard extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Name of the dashboard. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Dashboard display name/title visible to users. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Optional. Description of the dashboard. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Definition of the dashboard like metadata, visualization and + * datasource configuration etc. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardDefinition definition = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $definition = null; + /** + * Output only. Whether it's an out of the box or custom created dashboard. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = 0; + /** + * Output only. Creation time of dashboard. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Time the dashboard was last edited. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. User who created the dashboard. + * + * Generated from protobuf field string create_user_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_user_id = ''; + /** + * Output only. User who last edited the dashboard. + * + * Generated from protobuf field string update_user_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_user_id = ''; + /** + * Output only. User Preferences for a dashboard + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardUserData dashboard_user_data = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $dashboard_user_data = null; + /** + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + /** + * Output only. Access of the dashboard + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardAccess access = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $access = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Name of the dashboard. + * @type string $display_name + * Required. Dashboard display name/title visible to users. + * @type string $description + * Optional. Description of the dashboard. + * @type \Google\Cloud\Chronicle\V1\DashboardDefinition $definition + * Optional. Definition of the dashboard like metadata, visualization and + * datasource configuration etc. + * @type int $type + * Output only. Whether it's an out of the box or custom created dashboard. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of dashboard. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Time the dashboard was last edited. + * @type string $create_user_id + * Output only. User who created the dashboard. + * @type string $update_user_id + * Output only. User who last edited the dashboard. + * @type \Google\Cloud\Chronicle\V1\DashboardUserData $dashboard_user_data + * Output only. User Preferences for a dashboard + * @type string $etag + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @type int $access + * Output only. Access of the dashboard + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Name of the dashboard. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Name of the dashboard. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Dashboard display name/title visible to users. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. Dashboard display name/title visible to users. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. Description of the dashboard. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the dashboard. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Definition of the dashboard like metadata, visualization and + * datasource configuration etc. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardDefinition definition = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\DashboardDefinition|null + */ + public function getDefinition() + { + return $this->definition; + } + + public function hasDefinition() + { + return isset($this->definition); + } + + public function clearDefinition() + { + unset($this->definition); + } + + /** + * Optional. Definition of the dashboard like metadata, visualization and + * datasource configuration etc. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardDefinition definition = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardDefinition $var + * @return $this + */ + public function setDefinition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardDefinition::class); + $this->definition = $var; + + return $this; + } + + /** + * Output only. Whether it's an out of the box or custom created dashboard. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. Whether it's an out of the box or custom created dashboard. + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\DashboardType::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. Creation time of dashboard. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Creation time of dashboard. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Time the dashboard was last edited. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Time the dashboard was last edited. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. User who created the dashboard. + * + * Generated from protobuf field string create_user_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCreateUserId() + { + return $this->create_user_id; + } + + /** + * Output only. User who created the dashboard. + * + * Generated from protobuf field string create_user_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCreateUserId($var) + { + GPBUtil::checkString($var, True); + $this->create_user_id = $var; + + return $this; + } + + /** + * Output only. User who last edited the dashboard. + * + * Generated from protobuf field string update_user_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUpdateUserId() + { + return $this->update_user_id; + } + + /** + * Output only. User who last edited the dashboard. + * + * Generated from protobuf field string update_user_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUpdateUserId($var) + { + GPBUtil::checkString($var, True); + $this->update_user_id = $var; + + return $this; + } + + /** + * Output only. User Preferences for a dashboard + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardUserData dashboard_user_data = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Chronicle\V1\DashboardUserData|null + */ + public function getDashboardUserData() + { + return $this->dashboard_user_data; + } + + public function hasDashboardUserData() + { + return isset($this->dashboard_user_data); + } + + public function clearDashboardUserData() + { + unset($this->dashboard_user_data); + } + + /** + * Output only. User Preferences for a dashboard + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardUserData dashboard_user_data = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Chronicle\V1\DashboardUserData $var + * @return $this + */ + public function setDashboardUserData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DashboardUserData::class); + $this->dashboard_user_data = $var; + + return $this; + } + + /** + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Output only. Access of the dashboard + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardAccess access = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getAccess() + { + return $this->access; + } + + /** + * Output only. Access of the dashboard + * + * Generated from protobuf field .google.cloud.chronicle.v1.DashboardAccess access = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setAccess($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\DashboardAccess::class); + $this->access = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/NativeDashboardView.php b/Chronicle/src/V1/NativeDashboardView.php new file mode 100644 index 00000000000..6ca1db68316 --- /dev/null +++ b/Chronicle/src/V1/NativeDashboardView.php @@ -0,0 +1,62 @@ +google.cloud.chronicle.v1.NativeDashboardView + */ +class NativeDashboardView +{ + /** + * Defaults to basic. + * + * Generated from protobuf enum NATIVE_DASHBOARD_VIEW_UNSPECIFIED = 0; + */ + const NATIVE_DASHBOARD_VIEW_UNSPECIFIED = 0; + /** + * Include basic metadata about the dashboard without full definition. + * + * Generated from protobuf enum NATIVE_DASHBOARD_VIEW_BASIC = 1; + */ + const NATIVE_DASHBOARD_VIEW_BASIC = 1; + /** + * Include everything. + * + * Generated from protobuf enum NATIVE_DASHBOARD_VIEW_FULL = 2; + */ + const NATIVE_DASHBOARD_VIEW_FULL = 2; + + private static $valueToName = [ + self::NATIVE_DASHBOARD_VIEW_UNSPECIFIED => 'NATIVE_DASHBOARD_VIEW_UNSPECIFIED', + self::NATIVE_DASHBOARD_VIEW_BASIC => 'NATIVE_DASHBOARD_VIEW_BASIC', + self::NATIVE_DASHBOARD_VIEW_FULL => 'NATIVE_DASHBOARD_VIEW_FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/NativeDashboardWithChartsAndQueries.php b/Chronicle/src/V1/NativeDashboardWithChartsAndQueries.php new file mode 100644 index 00000000000..aaf937550d1 --- /dev/null +++ b/Chronicle/src/V1/NativeDashboardWithChartsAndQueries.php @@ -0,0 +1,145 @@ +google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueries + */ +class NativeDashboardWithChartsAndQueries extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Native dashboard. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard dashboard = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $dashboard = null; + /** + * Optional. Charts in the dashboard. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart dashboard_charts = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $dashboard_charts; + /** + * Optional. Queries in the dashboard. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardQuery dashboard_queries = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $dashboard_queries; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\NativeDashboard $dashboard + * Optional. Native dashboard. + * @type \Google\Cloud\Chronicle\V1\DashboardChart[] $dashboard_charts + * Optional. Charts in the dashboard. + * @type \Google\Cloud\Chronicle\V1\DashboardQuery[] $dashboard_queries + * Optional. Queries in the dashboard. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Native dashboard. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard dashboard = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Chronicle\V1\NativeDashboard|null + */ + public function getDashboard() + { + return $this->dashboard; + } + + public function hasDashboard() + { + return isset($this->dashboard); + } + + public function clearDashboard() + { + unset($this->dashboard); + } + + /** + * Optional. Native dashboard. + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard dashboard = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\NativeDashboard $var + * @return $this + */ + public function setDashboard($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\NativeDashboard::class); + $this->dashboard = $var; + + return $this; + } + + /** + * Optional. Charts in the dashboard. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart dashboard_charts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DashboardChart> + */ + public function getDashboardCharts() + { + return $this->dashboard_charts; + } + + /** + * Optional. Charts in the dashboard. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardChart dashboard_charts = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardChart[] $var + * @return $this + */ + public function setDashboardCharts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DashboardChart::class); + $this->dashboard_charts = $arr; + + return $this; + } + + /** + * Optional. Queries in the dashboard. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardQuery dashboard_queries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\DashboardQuery> + */ + public function getDashboardQueries() + { + return $this->dashboard_queries; + } + + /** + * Optional. Queries in the dashboard. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.DashboardQuery dashboard_queries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Chronicle\V1\DashboardQuery[] $var + * @return $this + */ + public function setDashboardQueries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DashboardQuery::class); + $this->dashboard_queries = $arr; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/PlotMode.php b/Chronicle/src/V1/PlotMode.php new file mode 100644 index 00000000000..51984fd662c --- /dev/null +++ b/Chronicle/src/V1/PlotMode.php @@ -0,0 +1,68 @@ +google.cloud.chronicle.v1.PlotMode + */ +class PlotMode +{ + /** + * Plot mode is not specified. + * + * Generated from protobuf enum PLOT_MODE_UNSPECIFIED = 0; + */ + const PLOT_MODE_UNSPECIFIED = 0; + /** + * Plot mode is points. + * + * Generated from protobuf enum PLOT_MODE_POINTS = 1; + */ + const PLOT_MODE_POINTS = 1; + /** + * Plot mode is heatmap. + * + * Generated from protobuf enum PLOT_MODE_HEATMAP = 2; + */ + const PLOT_MODE_HEATMAP = 2; + /** + * Plot mode is both points and heatmap. + * + * Generated from protobuf enum PLOT_MODE_BOTH = 3; + */ + const PLOT_MODE_BOTH = 3; + + private static $valueToName = [ + self::PLOT_MODE_UNSPECIFIED => 'PLOT_MODE_UNSPECIFIED', + self::PLOT_MODE_POINTS => 'PLOT_MODE_POINTS', + self::PLOT_MODE_HEATMAP => 'PLOT_MODE_HEATMAP', + self::PLOT_MODE_BOTH => 'PLOT_MODE_BOTH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/PointSizeType.php b/Chronicle/src/V1/PointSizeType.php new file mode 100644 index 00000000000..fae88d76457 --- /dev/null +++ b/Chronicle/src/V1/PointSizeType.php @@ -0,0 +1,61 @@ +google.cloud.chronicle.v1.PointSizeType + */ +class PointSizeType +{ + /** + * Point size is not specified. + * + * Generated from protobuf enum POINT_SIZE_TYPE_UNSPECIFIED = 0; + */ + const POINT_SIZE_TYPE_UNSPECIFIED = 0; + /** + * Point size is fixed. + * + * Generated from protobuf enum POINT_SIZE_TYPE_FIXED = 1; + */ + const POINT_SIZE_TYPE_FIXED = 1; + /** + * Point size is proportional to the size of the data point. + * + * Generated from protobuf enum POINT_SIZE_TYPE_PROPORTIONAL_TO_SIZE = 2; + */ + const POINT_SIZE_TYPE_PROPORTIONAL_TO_SIZE = 2; + + private static $valueToName = [ + self::POINT_SIZE_TYPE_UNSPECIFIED => 'POINT_SIZE_TYPE_UNSPECIFIED', + self::POINT_SIZE_TYPE_FIXED => 'POINT_SIZE_TYPE_FIXED', + self::POINT_SIZE_TYPE_PROPORTIONAL_TO_SIZE => 'POINT_SIZE_TYPE_PROPORTIONAL_TO_SIZE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/ProvisionBigQueryExportRequest.php b/Chronicle/src/V1/ProvisionBigQueryExportRequest.php new file mode 100644 index 00000000000..41622f5cc77 --- /dev/null +++ b/Chronicle/src/V1/ProvisionBigQueryExportRequest.php @@ -0,0 +1,86 @@ +google.cloud.chronicle.v1.ProvisionBigQueryExportRequest + */ +class ProvisionBigQueryExportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The instance for which BigQuery export is being provisioned. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + + /** + * @param string $parent Required. The instance for which BigQuery export is being provisioned. + * Format: projects/{project}/locations/{location}/instances/{instance} + * Please see {@see BigQueryExportServiceClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\ProvisionBigQueryExportRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The instance for which BigQuery export is being provisioned. + * Format: projects/{project}/locations/{location}/instances/{instance} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\BigQueryExport::initOnce(); + parent::__construct($data); + } + + /** + * Required. The instance for which BigQuery export is being provisioned. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The instance for which BigQuery export is being provisioned. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/QueryRuntimeError.php b/Chronicle/src/V1/QueryRuntimeError.php new file mode 100644 index 00000000000..032140db1d4 --- /dev/null +++ b/Chronicle/src/V1/QueryRuntimeError.php @@ -0,0 +1,203 @@ +google.cloud.chronicle.v1.QueryRuntimeError + */ +class QueryRuntimeError extends \Google\Protobuf\Internal\Message +{ + /** + * Short Description of the error. + * + * Generated from protobuf field string error_title = 1; + */ + protected $error_title = ''; + /** + * Error message + * + * Generated from protobuf field string error_description = 2; + */ + protected $error_description = ''; + /** + * Severity of the error. + * + * Generated from protobuf field .google.cloud.chronicle.v1.QueryRuntimeError.ErrorSeverity error_severity = 3; + */ + protected $error_severity = 0; + /** + * Metadata for the error. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.QueryRuntimeError.QueryRuntimeErrorMetadata metadata = 4; + */ + private $metadata; + /** + * Reason for the error. + * + * Generated from protobuf field .google.cloud.chronicle.v1.QueryRuntimeError.WarningReason warning_reason = 5; + */ + protected $warning_reason = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $error_title + * Short Description of the error. + * @type string $error_description + * Error message + * @type int $error_severity + * Severity of the error. + * @type \Google\Cloud\Chronicle\V1\QueryRuntimeError\QueryRuntimeErrorMetadata[] $metadata + * Metadata for the error. + * @type int $warning_reason + * Reason for the error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * Short Description of the error. + * + * Generated from protobuf field string error_title = 1; + * @return string + */ + public function getErrorTitle() + { + return $this->error_title; + } + + /** + * Short Description of the error. + * + * Generated from protobuf field string error_title = 1; + * @param string $var + * @return $this + */ + public function setErrorTitle($var) + { + GPBUtil::checkString($var, True); + $this->error_title = $var; + + return $this; + } + + /** + * Error message + * + * Generated from protobuf field string error_description = 2; + * @return string + */ + public function getErrorDescription() + { + return $this->error_description; + } + + /** + * Error message + * + * Generated from protobuf field string error_description = 2; + * @param string $var + * @return $this + */ + public function setErrorDescription($var) + { + GPBUtil::checkString($var, True); + $this->error_description = $var; + + return $this; + } + + /** + * Severity of the error. + * + * Generated from protobuf field .google.cloud.chronicle.v1.QueryRuntimeError.ErrorSeverity error_severity = 3; + * @return int + */ + public function getErrorSeverity() + { + return $this->error_severity; + } + + /** + * Severity of the error. + * + * Generated from protobuf field .google.cloud.chronicle.v1.QueryRuntimeError.ErrorSeverity error_severity = 3; + * @param int $var + * @return $this + */ + public function setErrorSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\QueryRuntimeError\ErrorSeverity::class); + $this->error_severity = $var; + + return $this; + } + + /** + * Metadata for the error. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.QueryRuntimeError.QueryRuntimeErrorMetadata metadata = 4; + * @return RepeatedField<\Google\Cloud\Chronicle\V1\QueryRuntimeError\QueryRuntimeErrorMetadata> + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Metadata for the error. + * + * Generated from protobuf field repeated .google.cloud.chronicle.v1.QueryRuntimeError.QueryRuntimeErrorMetadata metadata = 4; + * @param \Google\Cloud\Chronicle\V1\QueryRuntimeError\QueryRuntimeErrorMetadata[] $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\QueryRuntimeError\QueryRuntimeErrorMetadata::class); + $this->metadata = $arr; + + return $this; + } + + /** + * Reason for the error. + * + * Generated from protobuf field .google.cloud.chronicle.v1.QueryRuntimeError.WarningReason warning_reason = 5; + * @return int + */ + public function getWarningReason() + { + return $this->warning_reason; + } + + /** + * Reason for the error. + * + * Generated from protobuf field .google.cloud.chronicle.v1.QueryRuntimeError.WarningReason warning_reason = 5; + * @param int $var + * @return $this + */ + public function setWarningReason($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\QueryRuntimeError\WarningReason::class); + $this->warning_reason = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/QueryRuntimeError/ErrorSeverity.php b/Chronicle/src/V1/QueryRuntimeError/ErrorSeverity.php new file mode 100644 index 00000000000..3b79186ecf3 --- /dev/null +++ b/Chronicle/src/V1/QueryRuntimeError/ErrorSeverity.php @@ -0,0 +1,61 @@ +google.cloud.chronicle.v1.QueryRuntimeError.ErrorSeverity + */ +class ErrorSeverity +{ + /** + * Severity is unknown. + * + * Generated from protobuf enum ERROR_SEVERITY_UNSPECIFIED = 0; + */ + const ERROR_SEVERITY_UNSPECIFIED = 0; + /** + * Severity is warning. + * + * Generated from protobuf enum WARNING = 1; + */ + const WARNING = 1; + /** + * Error is severe. + * + * Generated from protobuf enum SEVERE = 2; + */ + const SEVERE = 2; + + private static $valueToName = [ + self::ERROR_SEVERITY_UNSPECIFIED => 'ERROR_SEVERITY_UNSPECIFIED', + self::WARNING => 'WARNING', + self::SEVERE => 'SEVERE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/QueryRuntimeError/MetadataKey.php b/Chronicle/src/V1/QueryRuntimeError/MetadataKey.php new file mode 100644 index 00000000000..aba7c3c6faf --- /dev/null +++ b/Chronicle/src/V1/QueryRuntimeError/MetadataKey.php @@ -0,0 +1,54 @@ +google.cloud.chronicle.v1.QueryRuntimeError.MetadataKey + */ +class MetadataKey +{ + /** + * Key is unknown. + * + * Generated from protobuf enum METADATA_KEY_UNSPECIFIED = 0; + */ + const METADATA_KEY_UNSPECIFIED = 0; + /** + * Key is row limit. + * + * Generated from protobuf enum ROW_LIMIT = 1; + */ + const ROW_LIMIT = 1; + + private static $valueToName = [ + self::METADATA_KEY_UNSPECIFIED => 'METADATA_KEY_UNSPECIFIED', + self::ROW_LIMIT => 'ROW_LIMIT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/QueryRuntimeError/QueryRuntimeErrorMetadata.php b/Chronicle/src/V1/QueryRuntimeError/QueryRuntimeErrorMetadata.php new file mode 100644 index 00000000000..fcf2088ace2 --- /dev/null +++ b/Chronicle/src/V1/QueryRuntimeError/QueryRuntimeErrorMetadata.php @@ -0,0 +1,101 @@ +google.cloud.chronicle.v1.QueryRuntimeError.QueryRuntimeErrorMetadata + */ +class QueryRuntimeErrorMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Metadata key. + * + * Generated from protobuf field .google.cloud.chronicle.v1.QueryRuntimeError.MetadataKey key = 1; + */ + protected $key = 0; + /** + * Metadata value. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $key + * Metadata key. + * @type string $value + * Metadata value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * Metadata key. + * + * Generated from protobuf field .google.cloud.chronicle.v1.QueryRuntimeError.MetadataKey key = 1; + * @return int + */ + public function getKey() + { + return $this->key; + } + + /** + * Metadata key. + * + * Generated from protobuf field .google.cloud.chronicle.v1.QueryRuntimeError.MetadataKey key = 1; + * @param int $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Chronicle\V1\QueryRuntimeError\MetadataKey::class); + $this->key = $var; + + return $this; + } + + /** + * Metadata value. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Metadata value. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/QueryRuntimeError/WarningReason.php b/Chronicle/src/V1/QueryRuntimeError/WarningReason.php new file mode 100644 index 00000000000..3caba628f77 --- /dev/null +++ b/Chronicle/src/V1/QueryRuntimeError/WarningReason.php @@ -0,0 +1,68 @@ +google.cloud.chronicle.v1.QueryRuntimeError.WarningReason + */ +class WarningReason +{ + /** + * Reason is unknown. + * + * Generated from protobuf enum WARNING_REASON_UNSPECIFIED = 0; + */ + const WARNING_REASON_UNSPECIFIED = 0; + /** + * Reason is row limit exceeded. + * + * Generated from protobuf enum ROW_LIMIT_EXCEEDED = 1; + */ + const ROW_LIMIT_EXCEEDED = 1; + /** + * Reason is default row limit exceeded. + * + * Generated from protobuf enum DEFAULT_ROW_LIMIT_EXCEEDED = 2; + */ + const DEFAULT_ROW_LIMIT_EXCEEDED = 2; + /** + * Reason is curated query default row limit exceeded. + * + * Generated from protobuf enum CURATED_QUERY_DEFAULT_ROW_LIMIT_EXCEEDED = 3; + */ + const CURATED_QUERY_DEFAULT_ROW_LIMIT_EXCEEDED = 3; + + private static $valueToName = [ + self::WARNING_REASON_UNSPECIFIED => 'WARNING_REASON_UNSPECIFIED', + self::ROW_LIMIT_EXCEEDED => 'ROW_LIMIT_EXCEEDED', + self::DEFAULT_ROW_LIMIT_EXCEEDED => 'DEFAULT_ROW_LIMIT_EXCEEDED', + self::CURATED_QUERY_DEFAULT_ROW_LIMIT_EXCEEDED => 'CURATED_QUERY_DEFAULT_ROW_LIMIT_EXCEEDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/RemoveChartRequest.php b/Chronicle/src/V1/RemoveChartRequest.php new file mode 100644 index 00000000000..ddf1a53ca08 --- /dev/null +++ b/Chronicle/src/V1/RemoveChartRequest.php @@ -0,0 +1,125 @@ +google.cloud.chronicle.v1.RemoveChartRequest + */ +class RemoveChartRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The dashboard name to remove chart from. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The dashboard chart name to remove. + * + * Generated from protobuf field string dashboard_chart = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $dashboard_chart = ''; + + /** + * @param string $name Required. The dashboard name to remove chart from. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * Please see {@see NativeDashboardServiceClient::nativeDashboardName()} for help formatting this field. + * + * @return \Google\Cloud\Chronicle\V1\RemoveChartRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The dashboard name to remove chart from. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * @type string $dashboard_chart + * Required. The dashboard chart name to remove. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Required. The dashboard name to remove chart from. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The dashboard name to remove chart from. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The dashboard chart name to remove. + * + * Generated from protobuf field string dashboard_chart = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getDashboardChart() + { + return $this->dashboard_chart; + } + + /** + * Required. The dashboard chart name to remove. + * + * Generated from protobuf field string dashboard_chart = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDashboardChart($var) + { + GPBUtil::checkString($var, True); + $this->dashboard_chart = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/RenderType.php b/Chronicle/src/V1/RenderType.php new file mode 100644 index 00000000000..359a3507de2 --- /dev/null +++ b/Chronicle/src/V1/RenderType.php @@ -0,0 +1,68 @@ +google.cloud.chronicle.v1.RenderType + */ +class RenderType +{ + /** + * Defaults to Unspecified. + * + * Generated from protobuf enum RENDER_TYPE_UNSPECIFIED = 0; + */ + const RENDER_TYPE_UNSPECIFIED = 0; + /** + * Text render type. + * + * Generated from protobuf enum RENDER_TYPE_TEXT = 1; + */ + const RENDER_TYPE_TEXT = 1; + /** + * Icon render type. + * + * Generated from protobuf enum RENDER_TYPE_ICON = 2; + */ + const RENDER_TYPE_ICON = 2; + /** + * Icon and text render type. + * + * Generated from protobuf enum RENDER_TYPE_ICON_AND_TEXT = 3; + */ + const RENDER_TYPE_ICON_AND_TEXT = 3; + + private static $valueToName = [ + self::RENDER_TYPE_UNSPECIFIED => 'RENDER_TYPE_UNSPECIFIED', + self::RENDER_TYPE_TEXT => 'RENDER_TYPE_TEXT', + self::RENDER_TYPE_ICON => 'RENDER_TYPE_ICON', + self::RENDER_TYPE_ICON_AND_TEXT => 'RENDER_TYPE_ICON_AND_TEXT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/SeriesStackStrategy.php b/Chronicle/src/V1/SeriesStackStrategy.php new file mode 100644 index 00000000000..74f6af984bf --- /dev/null +++ b/Chronicle/src/V1/SeriesStackStrategy.php @@ -0,0 +1,63 @@ +google.cloud.chronicle.v1.SeriesStackStrategy + */ +class SeriesStackStrategy +{ + /** + * Generated from protobuf enum SERIES_STACK_STRATEGY_UNSPECIFIED = 0; + */ + const SERIES_STACK_STRATEGY_UNSPECIFIED = 0; + /** + * Generated from protobuf enum SAMESIGN = 1; + */ + const SAMESIGN = 1; + /** + * Generated from protobuf enum ALL = 2; + */ + const ALL = 2; + /** + * Generated from protobuf enum POSITIVE = 3; + */ + const POSITIVE = 3; + /** + * Generated from protobuf enum NEGATIVE = 4; + */ + const NEGATIVE = 4; + + private static $valueToName = [ + self::SERIES_STACK_STRATEGY_UNSPECIFIED => 'SERIES_STACK_STRATEGY_UNSPECIFIED', + self::SAMESIGN => 'SAMESIGN', + self::ALL => 'ALL', + self::POSITIVE => 'POSITIVE', + self::NEGATIVE => 'NEGATIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/SeriesType.php b/Chronicle/src/V1/SeriesType.php new file mode 100644 index 00000000000..7bb8e3e0dc6 --- /dev/null +++ b/Chronicle/src/V1/SeriesType.php @@ -0,0 +1,84 @@ +google.cloud.chronicle.v1.SeriesType + */ +class SeriesType +{ + /** + * Generated from protobuf enum SERIES_TYPE_UNSPECIFIED = 0; + */ + const SERIES_TYPE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum LINE = 1; + */ + const LINE = 1; + /** + * Generated from protobuf enum BAR = 2; + */ + const BAR = 2; + /** + * Generated from protobuf enum PIE = 3; + */ + const PIE = 3; + /** + * Generated from protobuf enum TEXT = 4; + */ + const TEXT = 4; + /** + * Represents map chart type. + * + * Generated from protobuf enum MAP = 5; + */ + const MAP = 5; + /** + * Represents gauge chart type. + * + * Generated from protobuf enum GAUGE = 6; + */ + const GAUGE = 6; + /** + * Represents scatterplot chart type. + * + * Generated from protobuf enum SCATTERPLOT = 7; + */ + const SCATTERPLOT = 7; + + private static $valueToName = [ + self::SERIES_TYPE_UNSPECIFIED => 'SERIES_TYPE_UNSPECIFIED', + self::LINE => 'LINE', + self::BAR => 'BAR', + self::PIE => 'PIE', + self::TEXT => 'TEXT', + self::MAP => 'MAP', + self::GAUGE => 'GAUGE', + self::SCATTERPLOT => 'SCATTERPLOT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/TileType.php b/Chronicle/src/V1/TileType.php new file mode 100644 index 00000000000..63e868885a3 --- /dev/null +++ b/Chronicle/src/V1/TileType.php @@ -0,0 +1,69 @@ +google.cloud.chronicle.v1.TileType + */ +class TileType +{ + /** + * Defaults to VISUALIZATION. + * + * Generated from protobuf enum TILE_TYPE_UNSPECIFIED = 0; + */ + const TILE_TYPE_UNSPECIFIED = 0; + /** + * Visualization i.e., bar charts, pie charts etc. + * + * Generated from protobuf enum TILE_TYPE_VISUALIZATION = 1; + */ + const TILE_TYPE_VISUALIZATION = 1; + /** + * Button with hyperlink. + * + * Generated from protobuf enum TILE_TYPE_BUTTON = 2; + */ + const TILE_TYPE_BUTTON = 2; + /** + * Markdown tile. + * + * Generated from protobuf enum TILE_TYPE_MARKDOWN = 3; + */ + const TILE_TYPE_MARKDOWN = 3; + + private static $valueToName = [ + self::TILE_TYPE_UNSPECIFIED => 'TILE_TYPE_UNSPECIFIED', + self::TILE_TYPE_VISUALIZATION => 'TILE_TYPE_VISUALIZATION', + self::TILE_TYPE_BUTTON => 'TILE_TYPE_BUTTON', + self::TILE_TYPE_MARKDOWN => 'TILE_TYPE_MARKDOWN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/TimeUnit.php b/Chronicle/src/V1/TimeUnit.php new file mode 100644 index 00000000000..e7f6968ce5e --- /dev/null +++ b/Chronicle/src/V1/TimeUnit.php @@ -0,0 +1,82 @@ +google.cloud.chronicle.v1.TimeUnit + */ +class TimeUnit +{ + /** + * Default unspecified. + * + * Generated from protobuf enum TIME_UNIT_UNSPECIFIED = 0; + */ + const TIME_UNIT_UNSPECIFIED = 0; + /** + * Generated from protobuf enum SECOND = 1; + */ + const SECOND = 1; + /** + * Generated from protobuf enum MINUTE = 2; + */ + const MINUTE = 2; + /** + * Generated from protobuf enum HOUR = 3; + */ + const HOUR = 3; + /** + * Generated from protobuf enum DAY = 4; + */ + const DAY = 4; + /** + * Generated from protobuf enum WEEK = 5; + */ + const WEEK = 5; + /** + * Generated from protobuf enum MONTH = 6; + */ + const MONTH = 6; + /** + * Generated from protobuf enum YEAR = 7; + */ + const YEAR = 7; + + private static $valueToName = [ + self::TIME_UNIT_UNSPECIFIED => 'TIME_UNIT_UNSPECIFIED', + self::SECOND => 'SECOND', + self::MINUTE => 'MINUTE', + self::HOUR => 'HOUR', + self::DAY => 'DAY', + self::WEEK => 'WEEK', + self::MONTH => 'MONTH', + self::YEAR => 'YEAR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/TimestampMetadata.php b/Chronicle/src/V1/TimestampMetadata.php new file mode 100644 index 00000000000..47894d135e5 --- /dev/null +++ b/Chronicle/src/V1/TimestampMetadata.php @@ -0,0 +1,203 @@ +google.cloud.chronicle.v1.TimestampMetadata + */ +class TimestampMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Time format of the timestamp column. + * + * Generated from protobuf field string time_format = 1; + */ + protected $time_format = ''; + /** + * Time zone of the timestamp column. + * + * Generated from protobuf field string time_zone = 2; + */ + protected $time_zone = ''; + /** + * Time granularity of the timestamp column. + * + * Generated from protobuf field string time_granularity = 3; + */ + protected $time_granularity = ''; + /** + * Whether the timestamp column is sortable in UI. + * + * Generated from protobuf field bool is_sortable = 4; + */ + protected $is_sortable = false; + /** + * Whether the timestamp column is interpolable in UI. + * + * Generated from protobuf field bool is_interpolable = 5; + */ + protected $is_interpolable = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $time_format + * Time format of the timestamp column. + * @type string $time_zone + * Time zone of the timestamp column. + * @type string $time_granularity + * Time granularity of the timestamp column. + * @type bool $is_sortable + * Whether the timestamp column is sortable in UI. + * @type bool $is_interpolable + * Whether the timestamp column is interpolable in UI. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\DashboardQuery::initOnce(); + parent::__construct($data); + } + + /** + * Time format of the timestamp column. + * + * Generated from protobuf field string time_format = 1; + * @return string + */ + public function getTimeFormat() + { + return $this->time_format; + } + + /** + * Time format of the timestamp column. + * + * Generated from protobuf field string time_format = 1; + * @param string $var + * @return $this + */ + public function setTimeFormat($var) + { + GPBUtil::checkString($var, True); + $this->time_format = $var; + + return $this; + } + + /** + * Time zone of the timestamp column. + * + * Generated from protobuf field string time_zone = 2; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * Time zone of the timestamp column. + * + * Generated from protobuf field string time_zone = 2; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + + /** + * Time granularity of the timestamp column. + * + * Generated from protobuf field string time_granularity = 3; + * @return string + */ + public function getTimeGranularity() + { + return $this->time_granularity; + } + + /** + * Time granularity of the timestamp column. + * + * Generated from protobuf field string time_granularity = 3; + * @param string $var + * @return $this + */ + public function setTimeGranularity($var) + { + GPBUtil::checkString($var, True); + $this->time_granularity = $var; + + return $this; + } + + /** + * Whether the timestamp column is sortable in UI. + * + * Generated from protobuf field bool is_sortable = 4; + * @return bool + */ + public function getIsSortable() + { + return $this->is_sortable; + } + + /** + * Whether the timestamp column is sortable in UI. + * + * Generated from protobuf field bool is_sortable = 4; + * @param bool $var + * @return $this + */ + public function setIsSortable($var) + { + GPBUtil::checkBool($var); + $this->is_sortable = $var; + + return $this; + } + + /** + * Whether the timestamp column is interpolable in UI. + * + * Generated from protobuf field bool is_interpolable = 5; + * @return bool + */ + public function getIsInterpolable() + { + return $this->is_interpolable; + } + + /** + * Whether the timestamp column is interpolable in UI. + * + * Generated from protobuf field bool is_interpolable = 5; + * @param bool $var + * @return $this + */ + public function setIsInterpolable($var) + { + GPBUtil::checkBool($var); + $this->is_interpolable = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/ToolTipTrigger.php b/Chronicle/src/V1/ToolTipTrigger.php new file mode 100644 index 00000000000..abbed5759b2 --- /dev/null +++ b/Chronicle/src/V1/ToolTipTrigger.php @@ -0,0 +1,58 @@ +google.cloud.chronicle.v1.ToolTipTrigger + */ +class ToolTipTrigger +{ + /** + * Generated from protobuf enum TOOLTIP_TRIGGER_UNSPECIFIED = 0; + */ + const TOOLTIP_TRIGGER_UNSPECIFIED = 0; + /** + * Generated from protobuf enum TOOLTIP_TRIGGER_NONE = 1; + */ + const TOOLTIP_TRIGGER_NONE = 1; + /** + * Generated from protobuf enum TOOLTIP_TRIGGER_ITEM = 2; + */ + const TOOLTIP_TRIGGER_ITEM = 2; + /** + * Generated from protobuf enum TOOLTIP_TRIGGER_AXIS = 3; + */ + const TOOLTIP_TRIGGER_AXIS = 3; + + private static $valueToName = [ + self::TOOLTIP_TRIGGER_UNSPECIFIED => 'TOOLTIP_TRIGGER_UNSPECIFIED', + self::TOOLTIP_TRIGGER_NONE => 'TOOLTIP_TRIGGER_NONE', + self::TOOLTIP_TRIGGER_ITEM => 'TOOLTIP_TRIGGER_ITEM', + self::TOOLTIP_TRIGGER_AXIS => 'TOOLTIP_TRIGGER_AXIS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/UpdateBigQueryExportRequest.php b/Chronicle/src/V1/UpdateBigQueryExportRequest.php new file mode 100644 index 00000000000..c58b70a8a00 --- /dev/null +++ b/Chronicle/src/V1/UpdateBigQueryExportRequest.php @@ -0,0 +1,146 @@ +google.cloud.chronicle.v1.UpdateBigQueryExportRequest + */ +class UpdateBigQueryExportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The BigQueryExport settings to update. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/bigQueryExport + * + * Generated from protobuf field .google.cloud.chronicle.v1.BigQueryExport big_query_export = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $big_query_export = null; + /** + * Optional. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Chronicle\V1\BigQueryExport $bigQueryExport Required. The BigQueryExport settings to update. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/bigQueryExport + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. + * + * @return \Google\Cloud\Chronicle\V1\UpdateBigQueryExportRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Chronicle\V1\BigQueryExport $bigQueryExport, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setBigQueryExport($bigQueryExport) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\BigQueryExport $big_query_export + * Required. The BigQueryExport settings to update. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/bigQueryExport + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\BigQueryExport::initOnce(); + parent::__construct($data); + } + + /** + * Required. The BigQueryExport settings to update. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/bigQueryExport + * + * Generated from protobuf field .google.cloud.chronicle.v1.BigQueryExport big_query_export = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\BigQueryExport|null + */ + public function getBigQueryExport() + { + return $this->big_query_export; + } + + public function hasBigQueryExport() + { + return isset($this->big_query_export); + } + + public function clearBigQueryExport() + { + unset($this->big_query_export); + } + + /** + * Required. The BigQueryExport settings to update. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/bigQueryExport + * + * Generated from protobuf field .google.cloud.chronicle.v1.BigQueryExport big_query_export = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\BigQueryExport $var + * @return $this + */ + public function setBigQueryExport($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\BigQueryExport::class); + $this->big_query_export = $var; + + return $this; + } + + /** + * Optional. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/UpdateNativeDashboardRequest.php b/Chronicle/src/V1/UpdateNativeDashboardRequest.php new file mode 100644 index 00000000000..7af3a6cab0e --- /dev/null +++ b/Chronicle/src/V1/UpdateNativeDashboardRequest.php @@ -0,0 +1,197 @@ +google.cloud.chronicle.v1.UpdateNativeDashboardRequest + */ +class UpdateNativeDashboardRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The dashboard to update. + * The dashboard's `name` field is used to identify the dashboard to update. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard native_dashboard = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $native_dashboard = null; + /** + * Required. LINT.IfChange(update_mask_values) + * The list of fields to update. + * Supported paths are - + * display_name + * description + * definition.filters + * definition.charts + * type + * access + * dashboard_user_data.is_pinned + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Chronicle\V1\NativeDashboard $nativeDashboard Required. The dashboard to update. + * + * The dashboard's `name` field is used to identify the dashboard to update. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * @param \Google\Protobuf\FieldMask $updateMask Required. LINT.IfChange(update_mask_values) + * The list of fields to update. + * Supported paths are - + * display_name + * description + * definition.filters + * definition.charts + * type + * access + * dashboard_user_data.is_pinned + * + * @return \Google\Cloud\Chronicle\V1\UpdateNativeDashboardRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Chronicle\V1\NativeDashboard $nativeDashboard, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setNativeDashboard($nativeDashboard) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Chronicle\V1\NativeDashboard $native_dashboard + * Required. The dashboard to update. + * The dashboard's `name` field is used to identify the dashboard to update. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * @type \Google\Protobuf\FieldMask $update_mask + * Required. LINT.IfChange(update_mask_values) + * The list of fields to update. + * Supported paths are - + * display_name + * description + * definition.filters + * definition.charts + * type + * access + * dashboard_user_data.is_pinned + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Chronicle\V1\NativeDashboard::initOnce(); + parent::__construct($data); + } + + /** + * Required. The dashboard to update. + * The dashboard's `name` field is used to identify the dashboard to update. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard native_dashboard = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Chronicle\V1\NativeDashboard|null + */ + public function getNativeDashboard() + { + return $this->native_dashboard; + } + + public function hasNativeDashboard() + { + return isset($this->native_dashboard); + } + + public function clearNativeDashboard() + { + unset($this->native_dashboard); + } + + /** + * Required. The dashboard to update. + * The dashboard's `name` field is used to identify the dashboard to update. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard} + * + * Generated from protobuf field .google.cloud.chronicle.v1.NativeDashboard native_dashboard = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Chronicle\V1\NativeDashboard $var + * @return $this + */ + public function setNativeDashboard($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\NativeDashboard::class); + $this->native_dashboard = $var; + + return $this; + } + + /** + * Required. LINT.IfChange(update_mask_values) + * The list of fields to update. + * Supported paths are - + * display_name + * description + * definition.filters + * definition.charts + * type + * access + * dashboard_user_data.is_pinned + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. LINT.IfChange(update_mask_values) + * The list of fields to update. + * Supported paths are - + * display_name + * description + * definition.filters + * definition.charts + * type + * access + * dashboard_user_data.is_pinned + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/Chronicle/src/V1/VisualMapType.php b/Chronicle/src/V1/VisualMapType.php new file mode 100644 index 00000000000..f936d25469b --- /dev/null +++ b/Chronicle/src/V1/VisualMapType.php @@ -0,0 +1,62 @@ +google.cloud.chronicle.v1.VisualMapType + */ +class VisualMapType +{ + /** + * Visual map type is not specified + * + * Generated from protobuf enum VISUAL_MAP_TYPE_UNSPECIFIED = 0; + */ + const VISUAL_MAP_TYPE_UNSPECIFIED = 0; + /** + * Continuous visual map + * + * Generated from protobuf enum CONTINUOUS = 1; + */ + const CONTINUOUS = 1; + /** + * Piecewise visual map + * + * Generated from protobuf enum PIECEWISE = 2; + */ + const PIECEWISE = 2; + + private static $valueToName = [ + self::VISUAL_MAP_TYPE_UNSPECIFIED => 'VISUAL_MAP_TYPE_UNSPECIFIED', + self::CONTINUOUS => 'CONTINUOUS', + self::PIECEWISE => 'PIECEWISE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Chronicle/src/V1/gapic_metadata.json b/Chronicle/src/V1/gapic_metadata.json index 7edd4a684d5..72ec1f02360 100644 --- a/Chronicle/src/V1/gapic_metadata.json +++ b/Chronicle/src/V1/gapic_metadata.json @@ -5,6 +5,68 @@ "protoPackage": "google.cloud.chronicle.v1", "libraryPackage": "Google\\Cloud\\Chronicle\\V1", "services": { + "BigQueryExportService": { + "clients": { + "grpc": { + "libraryClient": "BigQueryExportServiceGapicClient", + "rpcs": { + "GetBigQueryExport": { + "methods": [ + "getBigQueryExport" + ] + }, + "ProvisionBigQueryExport": { + "methods": [ + "provisionBigQueryExport" + ] + }, + "UpdateBigQueryExport": { + "methods": [ + "updateBigQueryExport" + ] + } + } + } + } + }, + "DashboardQueryService": { + "clients": { + "grpc": { + "libraryClient": "DashboardQueryServiceGapicClient", + "rpcs": { + "ExecuteDashboardQuery": { + "methods": [ + "executeDashboardQuery" + ] + }, + "GetDashboardQuery": { + "methods": [ + "getDashboardQuery" + ] + } + } + } + } + }, + "DashboardChartService": { + "clients": { + "grpc": { + "libraryClient": "DashboardChartServiceGapicClient", + "rpcs": { + "BatchGetDashboardCharts": { + "methods": [ + "batchGetDashboardCharts" + ] + }, + "GetDashboardChart": { + "methods": [ + "getDashboardChart" + ] + } + } + } + } + }, "DataAccessControlService": { "clients": { "grpc": { @@ -182,6 +244,99 @@ } } }, + "NativeDashboardService": { + "clients": { + "grpc": { + "libraryClient": "NativeDashboardServiceGapicClient", + "rpcs": { + "AddChart": { + "methods": [ + "addChart" + ] + }, + "CreateNativeDashboard": { + "methods": [ + "createNativeDashboard" + ] + }, + "DeleteNativeDashboard": { + "methods": [ + "deleteNativeDashboard" + ] + }, + "DuplicateChart": { + "methods": [ + "duplicateChart" + ] + }, + "DuplicateNativeDashboard": { + "methods": [ + "duplicateNativeDashboard" + ] + }, + "EditChart": { + "methods": [ + "editChart" + ] + }, + "ExportNativeDashboards": { + "methods": [ + "exportNativeDashboards" + ] + }, + "GetNativeDashboard": { + "methods": [ + "getNativeDashboard" + ] + }, + "ImportNativeDashboards": { + "methods": [ + "importNativeDashboards" + ] + }, + "ListNativeDashboards": { + "methods": [ + "listNativeDashboards" + ] + }, + "RemoveChart": { + "methods": [ + "removeChart" + ] + }, + "UpdateNativeDashboard": { + "methods": [ + "updateNativeDashboard" + ] + } + } + } + } + }, + "FeaturedContentNativeDashboardService": { + "clients": { + "grpc": { + "libraryClient": "FeaturedContentNativeDashboardServiceGapicClient", + "rpcs": { + "GetFeaturedContentNativeDashboard": { + "methods": [ + "getFeaturedContentNativeDashboard" + ] + }, + "InstallFeaturedContentNativeDashboard": { + "methods": [ + "installFeaturedContentNativeDashboard" + ] + }, + "ListFeaturedContentNativeDashboards": { + "methods": [ + "listFeaturedContentNativeDashboards" + ] + } + } + } + } + }, "InstanceService": { "clients": { "grpc": { diff --git a/Chronicle/src/V1/resources/big_query_export_service_client_config.json b/Chronicle/src/V1/resources/big_query_export_service_client_config.json new file mode 100644 index 00000000000..427d37b80c2 --- /dev/null +++ b/Chronicle/src/V1/resources/big_query_export_service_client_config.json @@ -0,0 +1,49 @@ +{ + "interfaces": { + "google.cloud.chronicle.v1.BigQueryExportService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_2_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 120000, + "initial_rpc_timeout_millis": 120000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 120000, + "total_timeout_millis": 120000 + } + }, + "methods": { + "GetBigQueryExport": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ProvisionBigQueryExport": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "UpdateBigQueryExport": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + } + } + } + } +} diff --git a/Chronicle/src/V1/resources/big_query_export_service_descriptor_config.php b/Chronicle/src/V1/resources/big_query_export_service_descriptor_config.php new file mode 100644 index 00000000000..9eecb4943f2 --- /dev/null +++ b/Chronicle/src/V1/resources/big_query_export_service_descriptor_config.php @@ -0,0 +1,69 @@ + [ + 'google.cloud.chronicle.v1.BigQueryExportService' => [ + 'GetBigQueryExport' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\BigQueryExport', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ProvisionBigQueryExport' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\BigQueryExport', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateBigQueryExport' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\BigQueryExport', + 'headerParams' => [ + [ + 'keyName' => 'big_query_export.name', + 'fieldAccessors' => [ + 'getBigQueryExport', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'bigQueryExport' => 'projects/{project}/locations/{location}/instances/{instance}/bigQueryExport', + 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', + ], + ], + ], +]; diff --git a/Chronicle/src/V1/resources/big_query_export_service_rest_client_config.php b/Chronicle/src/V1/resources/big_query_export_service_rest_client_config.php new file mode 100644 index 00000000000..534a37772f1 --- /dev/null +++ b/Chronicle/src/V1/resources/big_query_export_service_rest_client_config.php @@ -0,0 +1,112 @@ + [ + 'google.cloud.chronicle.v1.BigQueryExportService' => [ + 'GetBigQueryExport' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/bigQueryExport}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ProvisionBigQueryExport' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/bigQueryExport:provision', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateBigQueryExport' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{big_query_export.name=projects/*/locations/*/instances/*/bigQueryExport}', + 'body' => 'big_query_export', + 'placeholders' => [ + 'big_query_export.name' => [ + 'getters' => [ + 'getBigQueryExport', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/Chronicle/src/V1/resources/dashboard_chart_service_client_config.json b/Chronicle/src/V1/resources/dashboard_chart_service_client_config.json new file mode 100644 index 00000000000..31595fe9e65 --- /dev/null +++ b/Chronicle/src/V1/resources/dashboard_chart_service_client_config.json @@ -0,0 +1,44 @@ +{ + "interfaces": { + "google.cloud.chronicle.v1.DashboardChartService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "BatchGetDashboardCharts": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetDashboardChart": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/Chronicle/src/V1/resources/dashboard_chart_service_descriptor_config.php b/Chronicle/src/V1/resources/dashboard_chart_service_descriptor_config.php new file mode 100644 index 00000000000..9a91c348c9c --- /dev/null +++ b/Chronicle/src/V1/resources/dashboard_chart_service_descriptor_config.php @@ -0,0 +1,56 @@ + [ + 'google.cloud.chronicle.v1.DashboardChartService' => [ + 'BatchGetDashboardCharts' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\BatchGetDashboardChartsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetDashboardChart' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\DashboardChart', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'dashboardChart' => 'projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}', + 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', + ], + ], + ], +]; diff --git a/Chronicle/src/V1/resources/dashboard_chart_service_rest_client_config.php b/Chronicle/src/V1/resources/dashboard_chart_service_rest_client_config.php new file mode 100644 index 00000000000..f178ba0b2d4 --- /dev/null +++ b/Chronicle/src/V1/resources/dashboard_chart_service_rest_client_config.php @@ -0,0 +1,98 @@ + [ + 'google.cloud.chronicle.v1.DashboardChartService' => [ + 'BatchGetDashboardCharts' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/dashboardCharts:batchGet', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetDashboardChart' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/dashboardCharts/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/Chronicle/src/V1/resources/dashboard_query_service_client_config.json b/Chronicle/src/V1/resources/dashboard_query_service_client_config.json new file mode 100644 index 00000000000..4490dae622f --- /dev/null +++ b/Chronicle/src/V1/resources/dashboard_query_service_client_config.json @@ -0,0 +1,54 @@ +{ + "interfaces": { + "google.cloud.chronicle.v1.DashboardQueryService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 1800000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 1800000, + "total_timeout_millis": 1800000 + } + }, + "methods": { + "ExecuteDashboardQuery": { + "timeout_millis": 1800000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetDashboardQuery": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/Chronicle/src/V1/resources/dashboard_query_service_descriptor_config.php b/Chronicle/src/V1/resources/dashboard_query_service_descriptor_config.php new file mode 100644 index 00000000000..e4733997aaa --- /dev/null +++ b/Chronicle/src/V1/resources/dashboard_query_service_descriptor_config.php @@ -0,0 +1,57 @@ + [ + 'google.cloud.chronicle.v1.DashboardQueryService' => [ + 'ExecuteDashboardQuery' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\ExecuteDashboardQueryResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetDashboardQuery' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\DashboardQuery', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'dashboardChart' => 'projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}', + 'dashboardQuery' => 'projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query}', + 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', + ], + ], + ], +]; diff --git a/Chronicle/src/V1/resources/dashboard_query_service_rest_client_config.php b/Chronicle/src/V1/resources/dashboard_query_service_rest_client_config.php new file mode 100644 index 00000000000..44abdc791cc --- /dev/null +++ b/Chronicle/src/V1/resources/dashboard_query_service_rest_client_config.php @@ -0,0 +1,99 @@ + [ + 'google.cloud.chronicle.v1.DashboardQueryService' => [ + 'ExecuteDashboardQuery' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/dashboardQueries:execute', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetDashboardQuery' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/dashboardQueries/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/Chronicle/src/V1/resources/data_access_control_service_client_config.json b/Chronicle/src/V1/resources/data_access_control_service_client_config.json index e66f91bd3a6..93ed52f8b47 100644 --- a/Chronicle/src/V1/resources/data_access_control_service_client_config.json +++ b/Chronicle/src/V1/resources/data_access_control_service_client_config.json @@ -6,7 +6,7 @@ "retry_policy_1_codes": [ "UNAVAILABLE" ], - "no_retry_1_codes": [] + "no_retry_2_codes": [] }, "retry_params": { "no_retry_params": { @@ -27,7 +27,7 @@ "max_rpc_timeout_millis": 60000, "total_timeout_millis": 60000 }, - "no_retry_1_params": { + "no_retry_2_params": { "initial_retry_delay_millis": 0, "retry_delay_multiplier": 0.0, "max_retry_delay_millis": 0, @@ -40,23 +40,23 @@ "methods": { "CreateDataAccessLabel": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" }, "CreateDataAccessScope": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" }, "DeleteDataAccessLabel": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" }, "DeleteDataAccessScope": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" }, "GetDataAccessLabel": { "timeout_millis": 60000, @@ -80,13 +80,13 @@ }, "UpdateDataAccessLabel": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" }, "UpdateDataAccessScope": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" } } } diff --git a/Chronicle/src/V1/resources/data_table_service_client_config.json b/Chronicle/src/V1/resources/data_table_service_client_config.json index 8977263a9e4..2aca06ccfed 100644 --- a/Chronicle/src/V1/resources/data_table_service_client_config.json +++ b/Chronicle/src/V1/resources/data_table_service_client_config.json @@ -3,10 +3,10 @@ "google.cloud.chronicle.v1.DataTableService": { "retry_codes": { "no_retry_codes": [], - "retry_policy_4_codes": [ + "retry_policy_5_codes": [ "UNAVAILABLE" ], - "no_retry_4_codes": [] + "no_retry_5_codes": [] }, "retry_params": { "no_retry_params": { @@ -18,7 +18,7 @@ "max_rpc_timeout_millis": 0, "total_timeout_millis": 0 }, - "retry_policy_4_params": { + "retry_policy_5_params": { "initial_retry_delay_millis": 1000, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, @@ -27,7 +27,7 @@ "max_rpc_timeout_millis": 600000, "total_timeout_millis": 600000 }, - "no_retry_4_params": { + "no_retry_5_params": { "initial_retry_delay_millis": 0, "retry_delay_multiplier": 0.0, "max_retry_delay_millis": 0, @@ -40,78 +40,78 @@ "methods": { "BulkCreateDataTableRows": { "timeout_millis": 600000, - "retry_codes_name": "no_retry_4_codes", - "retry_params_name": "no_retry_4_params" + "retry_codes_name": "no_retry_5_codes", + "retry_params_name": "no_retry_5_params" }, "BulkGetDataTableRows": { "timeout_millis": 600000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" }, "BulkReplaceDataTableRows": { "timeout_millis": 600000, - "retry_codes_name": "no_retry_4_codes", - "retry_params_name": "no_retry_4_params" + "retry_codes_name": "no_retry_5_codes", + "retry_params_name": "no_retry_5_params" }, "BulkUpdateDataTableRows": { "timeout_millis": 600000, - "retry_codes_name": "no_retry_4_codes", - "retry_params_name": "no_retry_4_params" + "retry_codes_name": "no_retry_5_codes", + "retry_params_name": "no_retry_5_params" }, "CreateDataTable": { "timeout_millis": 600000, - "retry_codes_name": "no_retry_4_codes", - "retry_params_name": "no_retry_4_params" + "retry_codes_name": "no_retry_5_codes", + "retry_params_name": "no_retry_5_params" }, "CreateDataTableRow": { "timeout_millis": 600000, - "retry_codes_name": "no_retry_4_codes", - "retry_params_name": "no_retry_4_params" + "retry_codes_name": "no_retry_5_codes", + "retry_params_name": "no_retry_5_params" }, "DeleteDataTable": { "timeout_millis": 600000, - "retry_codes_name": "no_retry_4_codes", - "retry_params_name": "no_retry_4_params" + "retry_codes_name": "no_retry_5_codes", + "retry_params_name": "no_retry_5_params" }, "DeleteDataTableRow": { "timeout_millis": 600000, - "retry_codes_name": "no_retry_4_codes", - "retry_params_name": "no_retry_4_params" + "retry_codes_name": "no_retry_5_codes", + "retry_params_name": "no_retry_5_params" }, "GetDataTable": { "timeout_millis": 600000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" }, "GetDataTableOperationErrors": { "timeout_millis": 600000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" }, "GetDataTableRow": { "timeout_millis": 600000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" }, "ListDataTableRows": { "timeout_millis": 600000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" }, "ListDataTables": { "timeout_millis": 600000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" }, "UpdateDataTable": { "timeout_millis": 600000, - "retry_codes_name": "no_retry_4_codes", - "retry_params_name": "no_retry_4_params" + "retry_codes_name": "no_retry_5_codes", + "retry_params_name": "no_retry_5_params" }, "UpdateDataTableRow": { "timeout_millis": 600000, - "retry_codes_name": "no_retry_4_codes", - "retry_params_name": "no_retry_4_params" + "retry_codes_name": "no_retry_5_codes", + "retry_params_name": "no_retry_5_params" } } } diff --git a/Chronicle/src/V1/resources/entity_service_client_config.json b/Chronicle/src/V1/resources/entity_service_client_config.json index d044fe021d4..5eda360a775 100644 --- a/Chronicle/src/V1/resources/entity_service_client_config.json +++ b/Chronicle/src/V1/resources/entity_service_client_config.json @@ -3,10 +3,10 @@ "google.cloud.chronicle.v1.EntityService": { "retry_codes": { "no_retry_codes": [], - "retry_policy_2_codes": [ + "retry_policy_3_codes": [ "UNAVAILABLE" ], - "no_retry_3_codes": [] + "no_retry_4_codes": [] }, "retry_params": { "no_retry_params": { @@ -18,7 +18,7 @@ "max_rpc_timeout_millis": 0, "total_timeout_millis": 0 }, - "retry_policy_2_params": { + "retry_policy_3_params": { "initial_retry_delay_millis": 1000, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 90000, @@ -27,7 +27,7 @@ "max_rpc_timeout_millis": 90000, "total_timeout_millis": 90000 }, - "no_retry_3_params": { + "no_retry_4_params": { "initial_retry_delay_millis": 0, "retry_delay_multiplier": 0.0, "max_retry_delay_millis": 0, @@ -40,28 +40,28 @@ "methods": { "CreateWatchlist": { "timeout_millis": 90000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" + "retry_codes_name": "no_retry_4_codes", + "retry_params_name": "no_retry_4_params" }, "DeleteWatchlist": { "timeout_millis": 90000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" + "retry_codes_name": "no_retry_4_codes", + "retry_params_name": "no_retry_4_params" }, "GetWatchlist": { "timeout_millis": 90000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" }, "ListWatchlists": { "timeout_millis": 90000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" }, "UpdateWatchlist": { "timeout_millis": 90000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" + "retry_codes_name": "no_retry_4_codes", + "retry_params_name": "no_retry_4_params" } } } diff --git a/Chronicle/src/V1/resources/featured_content_native_dashboard_service_client_config.json b/Chronicle/src/V1/resources/featured_content_native_dashboard_service_client_config.json new file mode 100644 index 00000000000..f06003b592c --- /dev/null +++ b/Chronicle/src/V1/resources/featured_content_native_dashboard_service_client_config.json @@ -0,0 +1,59 @@ +{ + "interfaces": { + "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_2_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "GetFeaturedContentNativeDashboard": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "InstallFeaturedContentNativeDashboard": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListFeaturedContentNativeDashboards": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/Chronicle/src/V1/resources/featured_content_native_dashboard_service_descriptor_config.php b/Chronicle/src/V1/resources/featured_content_native_dashboard_service_descriptor_config.php new file mode 100644 index 00000000000..7a4c36e97ba --- /dev/null +++ b/Chronicle/src/V1/resources/featured_content_native_dashboard_service_descriptor_config.php @@ -0,0 +1,80 @@ + [ + 'google.cloud.chronicle.v1.FeaturedContentNativeDashboardService' => [ + 'GetFeaturedContentNativeDashboard' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\FeaturedContentNativeDashboard', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'InstallFeaturedContentNativeDashboard' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\InstallFeaturedContentNativeDashboardResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListFeaturedContentNativeDashboards' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getFeaturedContentNativeDashboards', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\ListFeaturedContentNativeDashboardsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'contentHub' => 'projects/{project}/locations/{location}/instances/{instance}/contentHub', + 'dashboardChart' => 'projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}', + 'dashboardQuery' => 'projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query}', + 'featuredContentNativeDashboard' => 'projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard}', + 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', + 'nativeDashboard' => 'projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard}', + ], + ], + ], +]; diff --git a/Chronicle/src/V1/resources/featured_content_native_dashboard_service_rest_client_config.php b/Chronicle/src/V1/resources/featured_content_native_dashboard_service_rest_client_config.php new file mode 100644 index 00000000000..414c0d94315 --- /dev/null +++ b/Chronicle/src/V1/resources/featured_content_native_dashboard_service_rest_client_config.php @@ -0,0 +1,110 @@ + [ + 'google.cloud.chronicle.v1.FeaturedContentNativeDashboardService' => [ + 'GetFeaturedContentNativeDashboard' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/contentHub/featuredContentNativeDashboards/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'InstallFeaturedContentNativeDashboard' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/contentHub/featuredContentNativeDashboards/*}:install', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListFeaturedContentNativeDashboards' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*/contentHub}/featuredContentNativeDashboards', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/Chronicle/src/V1/resources/native_dashboard_service_client_config.json b/Chronicle/src/V1/resources/native_dashboard_service_client_config.json new file mode 100644 index 00000000000..9de9c63abe1 --- /dev/null +++ b/Chronicle/src/V1/resources/native_dashboard_service_client_config.json @@ -0,0 +1,104 @@ +{ + "interfaces": { + "google.cloud.chronicle.v1.NativeDashboardService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_2_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "AddChart": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreateNativeDashboard": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "DeleteNativeDashboard": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "DuplicateChart": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "DuplicateNativeDashboard": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "EditChart": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "ExportNativeDashboards": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetNativeDashboard": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ImportNativeDashboards": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "ListNativeDashboards": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RemoveChart": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "UpdateNativeDashboard": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + } + } + } + } +} diff --git a/Chronicle/src/V1/resources/native_dashboard_service_descriptor_config.php b/Chronicle/src/V1/resources/native_dashboard_service_descriptor_config.php new file mode 100644 index 00000000000..edf23c87150 --- /dev/null +++ b/Chronicle/src/V1/resources/native_dashboard_service_descriptor_config.php @@ -0,0 +1,187 @@ + [ + 'google.cloud.chronicle.v1.NativeDashboardService' => [ + 'AddChart' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\AddChartResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateNativeDashboard' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\NativeDashboard', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteNativeDashboard' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DuplicateChart' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\DuplicateChartResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DuplicateNativeDashboard' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\NativeDashboard', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'EditChart' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\EditChartResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ExportNativeDashboards' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\ExportNativeDashboardsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetNativeDashboard' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\NativeDashboard', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ImportNativeDashboards' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\ImportNativeDashboardsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListNativeDashboards' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getNativeDashboards', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\ListNativeDashboardsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'RemoveChart' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\NativeDashboard', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateNativeDashboard' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Chronicle\V1\NativeDashboard', + 'headerParams' => [ + [ + 'keyName' => 'native_dashboard.name', + 'fieldAccessors' => [ + 'getNativeDashboard', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'dashboardChart' => 'projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}', + 'dashboardQuery' => 'projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query}', + 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', + 'nativeDashboard' => 'projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard}', + ], + ], + ], +]; diff --git a/Chronicle/src/V1/resources/native_dashboard_service_rest_client_config.php b/Chronicle/src/V1/resources/native_dashboard_service_rest_client_config.php new file mode 100644 index 00000000000..db983134a84 --- /dev/null +++ b/Chronicle/src/V1/resources/native_dashboard_service_rest_client_config.php @@ -0,0 +1,221 @@ + [ + 'google.cloud.chronicle.v1.NativeDashboardService' => [ + 'AddChart' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:addChart', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateNativeDashboard' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/nativeDashboards', + 'body' => 'native_dashboard', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteNativeDashboard' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DuplicateChart' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:duplicateChart', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DuplicateNativeDashboard' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:duplicate', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'EditChart' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:editChart', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExportNativeDashboards' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/nativeDashboards:export', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetNativeDashboard' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportNativeDashboards' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/nativeDashboards:import', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListNativeDashboards' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/nativeDashboards', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RemoveChart' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:removeChart', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateNativeDashboard' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{native_dashboard.name=projects/*/locations/*/instances/*/nativeDashboards/*}', + 'body' => 'native_dashboard', + 'placeholders' => [ + 'native_dashboard.name' => [ + 'getters' => [ + 'getNativeDashboard', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/Chronicle/src/V1/resources/reference_list_service_client_config.json b/Chronicle/src/V1/resources/reference_list_service_client_config.json index 32f3e90972f..731c05c9706 100644 --- a/Chronicle/src/V1/resources/reference_list_service_client_config.json +++ b/Chronicle/src/V1/resources/reference_list_service_client_config.json @@ -6,7 +6,7 @@ "retry_policy_1_codes": [ "UNAVAILABLE" ], - "no_retry_1_codes": [] + "no_retry_2_codes": [] }, "retry_params": { "no_retry_params": { @@ -27,7 +27,7 @@ "max_rpc_timeout_millis": 60000, "total_timeout_millis": 60000 }, - "no_retry_1_params": { + "no_retry_2_params": { "initial_retry_delay_millis": 0, "retry_delay_multiplier": 0.0, "max_retry_delay_millis": 0, @@ -40,8 +40,8 @@ "methods": { "CreateReferenceList": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" }, "GetReferenceList": { "timeout_millis": 60000, @@ -55,8 +55,8 @@ }, "UpdateReferenceList": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" } } } diff --git a/Chronicle/src/V1/resources/rule_service_client_config.json b/Chronicle/src/V1/resources/rule_service_client_config.json index 101a8c15dd9..46102ab67fd 100644 --- a/Chronicle/src/V1/resources/rule_service_client_config.json +++ b/Chronicle/src/V1/resources/rule_service_client_config.json @@ -6,11 +6,11 @@ "retry_policy_1_codes": [ "UNAVAILABLE" ], - "retry_policy_3_codes": [ + "retry_policy_4_codes": [ "UNAVAILABLE" ], - "no_retry_1_codes": [], - "no_retry_2_codes": [] + "no_retry_2_codes": [], + "no_retry_3_codes": [] }, "retry_params": { "no_retry_params": { @@ -31,7 +31,7 @@ "max_rpc_timeout_millis": 60000, "total_timeout_millis": 60000 }, - "retry_policy_3_params": { + "retry_policy_4_params": { "initial_retry_delay_millis": 1000, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 600000, @@ -40,7 +40,7 @@ "max_rpc_timeout_millis": 600000, "total_timeout_millis": 600000 }, - "no_retry_1_params": { + "no_retry_2_params": { "initial_retry_delay_millis": 0, "retry_delay_multiplier": 0.0, "max_retry_delay_millis": 0, @@ -49,7 +49,7 @@ "max_rpc_timeout_millis": 60000, "total_timeout_millis": 60000 }, - "no_retry_2_params": { + "no_retry_3_params": { "initial_retry_delay_millis": 0, "retry_delay_multiplier": 0.0, "max_retry_delay_millis": 0, @@ -62,18 +62,18 @@ "methods": { "CreateRetrohunt": { "timeout_millis": 600000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" + "retry_codes_name": "no_retry_3_codes", + "retry_params_name": "no_retry_3_params" }, "CreateRule": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" }, "DeleteRule": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" }, "GetRetrohunt": { "timeout_millis": 60000, @@ -87,8 +87,8 @@ }, "GetRuleDeployment": { "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" }, "ListRetrohunts": { "timeout_millis": 60000, @@ -97,28 +97,28 @@ }, "ListRuleDeployments": { "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" }, "ListRuleRevisions": { "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" }, "ListRules": { "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" }, "UpdateRule": { "timeout_millis": 600000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" + "retry_codes_name": "no_retry_3_codes", + "retry_params_name": "no_retry_3_params" }, "UpdateRuleDeployment": { "timeout_millis": 600000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" + "retry_codes_name": "no_retry_3_codes", + "retry_params_name": "no_retry_3_params" } } } diff --git a/Chronicle/tests/Unit/V1/Client/BigQueryExportServiceClientTest.php b/Chronicle/tests/Unit/V1/Client/BigQueryExportServiceClientTest.php new file mode 100644 index 00000000000..d910de780a6 --- /dev/null +++ b/Chronicle/tests/Unit/V1/Client/BigQueryExportServiceClientTest.php @@ -0,0 +1,297 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return BigQueryExportServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new BigQueryExportServiceClient($options); + } + + /** @test */ + public function getBigQueryExportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $provisioned = true; + $expectedResponse = new BigQueryExport(); + $expectedResponse->setName($name2); + $expectedResponse->setProvisioned($provisioned); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->bigQueryExportName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetBigQueryExportRequest())->setName($formattedName); + $response = $gapicClient->getBigQueryExport($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.BigQueryExportService/GetBigQueryExport', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBigQueryExportExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->bigQueryExportName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetBigQueryExportRequest())->setName($formattedName); + try { + $gapicClient->getBigQueryExport($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function provisionBigQueryExportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $provisioned = true; + $expectedResponse = new BigQueryExport(); + $expectedResponse->setName($name); + $expectedResponse->setProvisioned($provisioned); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ProvisionBigQueryExportRequest())->setParent($formattedParent); + $response = $gapicClient->provisionBigQueryExport($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.BigQueryExportService/ProvisionBigQueryExport', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function provisionBigQueryExportExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ProvisionBigQueryExportRequest())->setParent($formattedParent); + try { + $gapicClient->provisionBigQueryExport($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateBigQueryExportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $provisioned = true; + $expectedResponse = new BigQueryExport(); + $expectedResponse->setName($name); + $expectedResponse->setProvisioned($provisioned); + $transport->addResponse($expectedResponse); + // Mock request + $bigQueryExport = new BigQueryExport(); + $request = (new UpdateBigQueryExportRequest())->setBigQueryExport($bigQueryExport); + $response = $gapicClient->updateBigQueryExport($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.BigQueryExportService/UpdateBigQueryExport', $actualFuncCall); + $actualValue = $actualRequestObject->getBigQueryExport(); + $this->assertProtobufEquals($bigQueryExport, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateBigQueryExportExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $bigQueryExport = new BigQueryExport(); + $request = (new UpdateBigQueryExportRequest())->setBigQueryExport($bigQueryExport); + try { + $gapicClient->updateBigQueryExport($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBigQueryExportAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $provisioned = true; + $expectedResponse = new BigQueryExport(); + $expectedResponse->setName($name2); + $expectedResponse->setProvisioned($provisioned); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->bigQueryExportName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetBigQueryExportRequest())->setName($formattedName); + $response = $gapicClient->getBigQueryExportAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.BigQueryExportService/GetBigQueryExport', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/Chronicle/tests/Unit/V1/Client/DashboardChartServiceClientTest.php b/Chronicle/tests/Unit/V1/Client/DashboardChartServiceClientTest.php new file mode 100644 index 00000000000..b131161a6e0 --- /dev/null +++ b/Chronicle/tests/Unit/V1/Client/DashboardChartServiceClientTest.php @@ -0,0 +1,235 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return DashboardChartServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DashboardChartServiceClient($options); + } + + /** @test */ + public function batchGetDashboardChartsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchGetDashboardChartsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $formattedNames = [$gapicClient->dashboardChartName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[CHART]')]; + $request = (new BatchGetDashboardChartsRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchGetDashboardCharts($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.DashboardChartService/BatchGetDashboardCharts', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchGetDashboardChartsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $formattedNames = [$gapicClient->dashboardChartName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[CHART]')]; + $request = (new BatchGetDashboardChartsRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchGetDashboardCharts($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDashboardChartTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $nativeDashboard = 'nativeDashboard-671726484'; + $etag = 'etag3123477'; + $expectedResponse = new DashboardChart(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setNativeDashboard($nativeDashboard); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dashboardChartName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[CHART]'); + $request = (new GetDashboardChartRequest())->setName($formattedName); + $response = $gapicClient->getDashboardChart($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.DashboardChartService/GetDashboardChart', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDashboardChartExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->dashboardChartName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[CHART]'); + $request = (new GetDashboardChartRequest())->setName($formattedName); + try { + $gapicClient->getDashboardChart($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchGetDashboardChartsAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchGetDashboardChartsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $formattedNames = [$gapicClient->dashboardChartName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[CHART]')]; + $request = (new BatchGetDashboardChartsRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchGetDashboardChartsAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.DashboardChartService/BatchGetDashboardCharts', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/Chronicle/tests/Unit/V1/Client/DashboardQueryServiceClientTest.php b/Chronicle/tests/Unit/V1/Client/DashboardQueryServiceClientTest.php new file mode 100644 index 00000000000..42429031979 --- /dev/null +++ b/Chronicle/tests/Unit/V1/Client/DashboardQueryServiceClientTest.php @@ -0,0 +1,246 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return DashboardQueryServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DashboardQueryServiceClient($options); + } + + /** @test */ + public function executeDashboardQueryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ExecuteDashboardQueryResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $query = new DashboardQuery(); + $queryQuery = 'queryQuery-181056288'; + $query->setQuery($queryQuery); + $queryInput = new Input(); + $query->setInput($queryInput); + $request = (new ExecuteDashboardQueryRequest())->setParent($formattedParent)->setQuery($query); + $response = $gapicClient->executeDashboardQuery($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.DashboardQueryService/ExecuteDashboardQuery', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function executeDashboardQueryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $query = new DashboardQuery(); + $queryQuery = 'queryQuery-181056288'; + $query->setQuery($queryQuery); + $queryInput = new Input(); + $query->setInput($queryInput); + $request = (new ExecuteDashboardQueryRequest())->setParent($formattedParent)->setQuery($query); + try { + $gapicClient->executeDashboardQuery($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDashboardQueryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $query = 'query107944136'; + $dashboardChart = 'dashboardChart-1592924557'; + $etag = 'etag3123477'; + $expectedResponse = new DashboardQuery(); + $expectedResponse->setName($name2); + $expectedResponse->setQuery($query); + $expectedResponse->setDashboardChart($dashboardChart); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dashboardQueryName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[QUERY]'); + $request = (new GetDashboardQueryRequest())->setName($formattedName); + $response = $gapicClient->getDashboardQuery($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.DashboardQueryService/GetDashboardQuery', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDashboardQueryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->dashboardQueryName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[QUERY]'); + $request = (new GetDashboardQueryRequest())->setName($formattedName); + try { + $gapicClient->getDashboardQuery($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function executeDashboardQueryAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ExecuteDashboardQueryResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $query = new DashboardQuery(); + $queryQuery = 'queryQuery-181056288'; + $query->setQuery($queryQuery); + $queryInput = new Input(); + $query->setInput($queryInput); + $request = (new ExecuteDashboardQueryRequest())->setParent($formattedParent)->setQuery($query); + $response = $gapicClient->executeDashboardQueryAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.DashboardQueryService/ExecuteDashboardQuery', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/Chronicle/tests/Unit/V1/Client/FeaturedContentNativeDashboardServiceClientTest.php b/Chronicle/tests/Unit/V1/Client/FeaturedContentNativeDashboardServiceClientTest.php new file mode 100644 index 00000000000..b5b0327f05c --- /dev/null +++ b/Chronicle/tests/Unit/V1/Client/FeaturedContentNativeDashboardServiceClientTest.php @@ -0,0 +1,334 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return FeaturedContentNativeDashboardServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new FeaturedContentNativeDashboardServiceClient($options); + } + + /** @test */ + public function getFeaturedContentNativeDashboardTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new FeaturedContentNativeDashboard(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->featuredContentNativeDashboardName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[FEATURED_CONTENT_NATIVE_DASHBOARD]' + ); + $request = (new GetFeaturedContentNativeDashboardRequest())->setName($formattedName); + $response = $gapicClient->getFeaturedContentNativeDashboard($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.chronicle.v1.FeaturedContentNativeDashboardService/GetFeaturedContentNativeDashboard', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFeaturedContentNativeDashboardExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->featuredContentNativeDashboardName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[FEATURED_CONTENT_NATIVE_DASHBOARD]' + ); + $request = (new GetFeaturedContentNativeDashboardRequest())->setName($formattedName); + try { + $gapicClient->getFeaturedContentNativeDashboard($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function installFeaturedContentNativeDashboardTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nativeDashboard = 'nativeDashboard-671726484'; + $expectedResponse = new InstallFeaturedContentNativeDashboardResponse(); + $expectedResponse->setNativeDashboard($nativeDashboard); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->featuredContentNativeDashboardName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[FEATURED_CONTENT_NATIVE_DASHBOARD]' + ); + $request = (new InstallFeaturedContentNativeDashboardRequest())->setName($formattedName); + $response = $gapicClient->installFeaturedContentNativeDashboard($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.chronicle.v1.FeaturedContentNativeDashboardService/InstallFeaturedContentNativeDashboard', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function installFeaturedContentNativeDashboardExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->featuredContentNativeDashboardName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[FEATURED_CONTENT_NATIVE_DASHBOARD]' + ); + $request = (new InstallFeaturedContentNativeDashboardRequest())->setName($formattedName); + try { + $gapicClient->installFeaturedContentNativeDashboard($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFeaturedContentNativeDashboardsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $featuredContentNativeDashboardsElement = new FeaturedContentNativeDashboard(); + $featuredContentNativeDashboards = [$featuredContentNativeDashboardsElement]; + $expectedResponse = new ListFeaturedContentNativeDashboardsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFeaturedContentNativeDashboards($featuredContentNativeDashboards); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->contentHubName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ListFeaturedContentNativeDashboardsRequest())->setParent($formattedParent); + $response = $gapicClient->listFeaturedContentNativeDashboards($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFeaturedContentNativeDashboards()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.chronicle.v1.FeaturedContentNativeDashboardService/ListFeaturedContentNativeDashboards', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFeaturedContentNativeDashboardsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->contentHubName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ListFeaturedContentNativeDashboardsRequest())->setParent($formattedParent); + try { + $gapicClient->listFeaturedContentNativeDashboards($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFeaturedContentNativeDashboardAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new FeaturedContentNativeDashboard(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->featuredContentNativeDashboardName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[FEATURED_CONTENT_NATIVE_DASHBOARD]' + ); + $request = (new GetFeaturedContentNativeDashboardRequest())->setName($formattedName); + $response = $gapicClient->getFeaturedContentNativeDashboardAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.chronicle.v1.FeaturedContentNativeDashboardService/GetFeaturedContentNativeDashboard', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/Chronicle/tests/Unit/V1/Client/NativeDashboardServiceClientTest.php b/Chronicle/tests/Unit/V1/Client/NativeDashboardServiceClientTest.php new file mode 100644 index 00000000000..610d0a8733f --- /dev/null +++ b/Chronicle/tests/Unit/V1/Client/NativeDashboardServiceClientTest.php @@ -0,0 +1,1034 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return NativeDashboardServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new NativeDashboardServiceClient($options); + } + + /** @test */ + public function addChartTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AddChartResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->nativeDashboardName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DASHBOARD]'); + $dashboardChart = new DashboardChart(); + $dashboardChartDisplayName = 'dashboardChartDisplayName-260950429'; + $dashboardChart->setDisplayName($dashboardChartDisplayName); + $dashboardChartVisualization = new Visualization(); + $dashboardChart->setVisualization($dashboardChartVisualization); + $chartLayout = new ChartLayout(); + $request = (new AddChartRequest()) + ->setName($formattedName) + ->setDashboardChart($dashboardChart) + ->setChartLayout($chartLayout); + $response = $gapicClient->addChart($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.NativeDashboardService/AddChart', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getDashboardChart(); + $this->assertProtobufEquals($dashboardChart, $actualValue); + $actualValue = $actualRequestObject->getChartLayout(); + $this->assertProtobufEquals($chartLayout, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function addChartExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->nativeDashboardName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DASHBOARD]'); + $dashboardChart = new DashboardChart(); + $dashboardChartDisplayName = 'dashboardChartDisplayName-260950429'; + $dashboardChart->setDisplayName($dashboardChartDisplayName); + $dashboardChartVisualization = new Visualization(); + $dashboardChart->setVisualization($dashboardChartVisualization); + $chartLayout = new ChartLayout(); + $request = (new AddChartRequest()) + ->setName($formattedName) + ->setDashboardChart($dashboardChart) + ->setChartLayout($chartLayout); + try { + $gapicClient->addChart($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createNativeDashboardTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $createUserId = 'createUserId-1225950772'; + $updateUserId = 'updateUserId-1278348135'; + $etag = 'etag3123477'; + $expectedResponse = new NativeDashboard(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setCreateUserId($createUserId); + $expectedResponse->setUpdateUserId($updateUserId); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $nativeDashboard = new NativeDashboard(); + $nativeDashboardDisplayName = 'nativeDashboardDisplayName-400195088'; + $nativeDashboard->setDisplayName($nativeDashboardDisplayName); + $request = (new CreateNativeDashboardRequest()) + ->setParent($formattedParent) + ->setNativeDashboard($nativeDashboard); + $response = $gapicClient->createNativeDashboard($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.NativeDashboardService/CreateNativeDashboard', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNativeDashboard(); + $this->assertProtobufEquals($nativeDashboard, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createNativeDashboardExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $nativeDashboard = new NativeDashboard(); + $nativeDashboardDisplayName = 'nativeDashboardDisplayName-400195088'; + $nativeDashboard->setDisplayName($nativeDashboardDisplayName); + $request = (new CreateNativeDashboardRequest()) + ->setParent($formattedParent) + ->setNativeDashboard($nativeDashboard); + try { + $gapicClient->createNativeDashboard($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteNativeDashboardTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->nativeDashboardName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DASHBOARD]'); + $request = (new DeleteNativeDashboardRequest())->setName($formattedName); + $gapicClient->deleteNativeDashboard($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.NativeDashboardService/DeleteNativeDashboard', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteNativeDashboardExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->nativeDashboardName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DASHBOARD]'); + $request = (new DeleteNativeDashboardRequest())->setName($formattedName); + try { + $gapicClient->deleteNativeDashboard($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function duplicateChartTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new DuplicateChartResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->nativeDashboardName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DASHBOARD]'); + $formattedDashboardChart = $gapicClient->dashboardChartName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[CHART]'); + $request = (new DuplicateChartRequest())->setName($formattedName)->setDashboardChart($formattedDashboardChart); + $response = $gapicClient->duplicateChart($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.NativeDashboardService/DuplicateChart', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getDashboardChart(); + $this->assertProtobufEquals($formattedDashboardChart, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function duplicateChartExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->nativeDashboardName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DASHBOARD]'); + $formattedDashboardChart = $gapicClient->dashboardChartName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[CHART]'); + $request = (new DuplicateChartRequest())->setName($formattedName)->setDashboardChart($formattedDashboardChart); + try { + $gapicClient->duplicateChart($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function duplicateNativeDashboardTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $createUserId = 'createUserId-1225950772'; + $updateUserId = 'updateUserId-1278348135'; + $etag = 'etag3123477'; + $expectedResponse = new NativeDashboard(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setCreateUserId($createUserId); + $expectedResponse->setUpdateUserId($updateUserId); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->nativeDashboardName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DASHBOARD]'); + $nativeDashboard = new NativeDashboard(); + $nativeDashboardDisplayName = 'nativeDashboardDisplayName-400195088'; + $nativeDashboard->setDisplayName($nativeDashboardDisplayName); + $request = (new DuplicateNativeDashboardRequest()) + ->setName($formattedName) + ->setNativeDashboard($nativeDashboard); + $response = $gapicClient->duplicateNativeDashboard($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.chronicle.v1.NativeDashboardService/DuplicateNativeDashboard', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getNativeDashboard(); + $this->assertProtobufEquals($nativeDashboard, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function duplicateNativeDashboardExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->nativeDashboardName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DASHBOARD]'); + $nativeDashboard = new NativeDashboard(); + $nativeDashboardDisplayName = 'nativeDashboardDisplayName-400195088'; + $nativeDashboard->setDisplayName($nativeDashboardDisplayName); + $request = (new DuplicateNativeDashboardRequest()) + ->setName($formattedName) + ->setNativeDashboard($nativeDashboard); + try { + $gapicClient->duplicateNativeDashboard($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function editChartTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new EditChartResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->nativeDashboardName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DASHBOARD]'); + $editMask = new FieldMask(); + $request = (new EditChartRequest())->setName($formattedName)->setEditMask($editMask); + $response = $gapicClient->editChart($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.NativeDashboardService/EditChart', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getEditMask(); + $this->assertProtobufEquals($editMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function editChartExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->nativeDashboardName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DASHBOARD]'); + $editMask = new FieldMask(); + $request = (new EditChartRequest())->setName($formattedName)->setEditMask($editMask); + try { + $gapicClient->editChart($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function exportNativeDashboardsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ExportNativeDashboardsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $names = []; + $request = (new ExportNativeDashboardsRequest())->setParent($formattedParent)->setNames($names); + $response = $gapicClient->exportNativeDashboards($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.NativeDashboardService/ExportNativeDashboards', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($names, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function exportNativeDashboardsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $names = []; + $request = (new ExportNativeDashboardsRequest())->setParent($formattedParent)->setNames($names); + try { + $gapicClient->exportNativeDashboards($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNativeDashboardTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $createUserId = 'createUserId-1225950772'; + $updateUserId = 'updateUserId-1278348135'; + $etag = 'etag3123477'; + $expectedResponse = new NativeDashboard(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setCreateUserId($createUserId); + $expectedResponse->setUpdateUserId($updateUserId); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->nativeDashboardName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DASHBOARD]'); + $request = (new GetNativeDashboardRequest())->setName($formattedName); + $response = $gapicClient->getNativeDashboard($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.NativeDashboardService/GetNativeDashboard', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNativeDashboardExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->nativeDashboardName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DASHBOARD]'); + $request = (new GetNativeDashboardRequest())->setName($formattedName); + try { + $gapicClient->getNativeDashboard($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importNativeDashboardsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ImportNativeDashboardsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $source = new ImportNativeDashboardsInlineSource(); + $sourceDashboards = []; + $source->setDashboards($sourceDashboards); + $request = (new ImportNativeDashboardsRequest())->setParent($formattedParent)->setSource($source); + $response = $gapicClient->importNativeDashboards($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.NativeDashboardService/ImportNativeDashboards', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSource(); + $this->assertProtobufEquals($source, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importNativeDashboardsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $source = new ImportNativeDashboardsInlineSource(); + $sourceDashboards = []; + $source->setDashboards($sourceDashboards); + $request = (new ImportNativeDashboardsRequest())->setParent($formattedParent)->setSource($source); + try { + $gapicClient->importNativeDashboards($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNativeDashboardsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $nativeDashboardsElement = new NativeDashboard(); + $nativeDashboards = [$nativeDashboardsElement]; + $expectedResponse = new ListNativeDashboardsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setNativeDashboards($nativeDashboards); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ListNativeDashboardsRequest())->setParent($formattedParent); + $response = $gapicClient->listNativeDashboards($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNativeDashboards()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.NativeDashboardService/ListNativeDashboards', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNativeDashboardsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ListNativeDashboardsRequest())->setParent($formattedParent); + try { + $gapicClient->listNativeDashboards($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function removeChartTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $createUserId = 'createUserId-1225950772'; + $updateUserId = 'updateUserId-1278348135'; + $etag = 'etag3123477'; + $expectedResponse = new NativeDashboard(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setCreateUserId($createUserId); + $expectedResponse->setUpdateUserId($updateUserId); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->nativeDashboardName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DASHBOARD]'); + $formattedDashboardChart = $gapicClient->dashboardChartName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[CHART]'); + $request = (new RemoveChartRequest())->setName($formattedName)->setDashboardChart($formattedDashboardChart); + $response = $gapicClient->removeChart($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.NativeDashboardService/RemoveChart', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getDashboardChart(); + $this->assertProtobufEquals($formattedDashboardChart, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function removeChartExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->nativeDashboardName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DASHBOARD]'); + $formattedDashboardChart = $gapicClient->dashboardChartName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[CHART]'); + $request = (new RemoveChartRequest())->setName($formattedName)->setDashboardChart($formattedDashboardChart); + try { + $gapicClient->removeChart($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateNativeDashboardTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $createUserId = 'createUserId-1225950772'; + $updateUserId = 'updateUserId-1278348135'; + $etag = 'etag3123477'; + $expectedResponse = new NativeDashboard(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setCreateUserId($createUserId); + $expectedResponse->setUpdateUserId($updateUserId); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $nativeDashboard = new NativeDashboard(); + $nativeDashboardDisplayName = 'nativeDashboardDisplayName-400195088'; + $nativeDashboard->setDisplayName($nativeDashboardDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateNativeDashboardRequest()) + ->setNativeDashboard($nativeDashboard) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateNativeDashboard($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.NativeDashboardService/UpdateNativeDashboard', $actualFuncCall); + $actualValue = $actualRequestObject->getNativeDashboard(); + $this->assertProtobufEquals($nativeDashboard, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateNativeDashboardExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $nativeDashboard = new NativeDashboard(); + $nativeDashboardDisplayName = 'nativeDashboardDisplayName-400195088'; + $nativeDashboard->setDisplayName($nativeDashboardDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateNativeDashboardRequest()) + ->setNativeDashboard($nativeDashboard) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateNativeDashboard($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function addChartAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AddChartResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->nativeDashboardName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[DASHBOARD]'); + $dashboardChart = new DashboardChart(); + $dashboardChartDisplayName = 'dashboardChartDisplayName-260950429'; + $dashboardChart->setDisplayName($dashboardChartDisplayName); + $dashboardChartVisualization = new Visualization(); + $dashboardChart->setVisualization($dashboardChartVisualization); + $chartLayout = new ChartLayout(); + $request = (new AddChartRequest()) + ->setName($formattedName) + ->setDashboardChart($dashboardChart) + ->setChartLayout($chartLayout); + $response = $gapicClient->addChartAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.chronicle.v1.NativeDashboardService/AddChart', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getDashboardChart(); + $this->assertProtobufEquals($dashboardChart, $actualValue); + $actualValue = $actualRequestObject->getChartLayout(); + $this->assertProtobufEquals($chartLayout, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +}