<?php
/*
 * Copyright 2014 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

namespace Google\Service\Assuredworkloads\Resource;

use Google\Service\Assuredworkloads\GoogleCloudAssuredworkloadsV1AggregateDbFrameworkComplianceReportResponse;
use Google\Service\Assuredworkloads\GoogleCloudAssuredworkloadsV1FetchDbFrameworkComplianceReportResponse;

/**
 * The "dbFrameworkComplianceReports" collection of methods.
 * Typical usage is:
 *  <code>
 *   $assuredworkloadsService = new Google\Service\Assuredworkloads(...);
 *   $dbFrameworkComplianceReports = $assuredworkloadsService->folders_locations_dbFrameworkComplianceReports;
 *  </code>
 */
class FoldersLocationsDbFrameworkComplianceReports extends \Google\Service\Resource
{
  /**
   * Gets the aggregated compliance report over time for a given scope.
   * (dbFrameworkComplianceReports.aggregate)
   *
   * @param string $name Required. The name of the aggregated compliance report
   * over time to retrieve. Format: `organizations/{organization_id}/locations/{lo
   * cation}/dbFrameworkComplianceReports/{db_framework_compliance_report}`
   * @param array $optParams Optional parameters.
   *
   * @opt_param string filter Optional. The filtering results.
   * @opt_param string interval.endTime Optional. Exclusive end of the interval.
   * If specified, a Timestamp matching this interval will have to be before the
   * end.
   * @opt_param string interval.startTime Optional. Inclusive start of the
   * interval. If specified, a Timestamp matching this interval will have to be
   * the same or after the start.
   * @return GoogleCloudAssuredworkloadsV1AggregateDbFrameworkComplianceReportResponse
   * @throws \Google\Service\Exception
   */
  public function aggregate($name, $optParams = [])
  {
    $params = ['name' => $name];
    $params = array_merge($params, $optParams);
    return $this->call('aggregate', [$params], GoogleCloudAssuredworkloadsV1AggregateDbFrameworkComplianceReportResponse::class);
  }
  /**
   * Fetches the framework compliance report for a given scope.
   * (dbFrameworkComplianceReports.fetch)
   *
   * @param string $name Required. The name of the framework compliance report to
   * retrieve.
   * @param array $optParams Optional parameters.
   *
   * @opt_param string endTime Optional. The end time of the report.
   * @opt_param string filter Optional. The filtering results.
   * @return GoogleCloudAssuredworkloadsV1FetchDbFrameworkComplianceReportResponse
   * @throws \Google\Service\Exception
   */
  public function fetch($name, $optParams = [])
  {
    $params = ['name' => $name];
    $params = array_merge($params, $optParams);
    return $this->call('fetch', [$params], GoogleCloudAssuredworkloadsV1FetchDbFrameworkComplianceReportResponse::class);
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FoldersLocationsDbFrameworkComplianceReports::class, 'Google_Service_Assuredworkloads_Resource_FoldersLocationsDbFrameworkComplianceReports');
