1<?php 2/* 3 * Copyright 2014 Google Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 6 * use this file except in compliance with the License. You may obtain a copy of 7 * the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 * License for the specific language governing permissions and limitations under 15 * the License. 16 */ 17 18namespace Google\Service\Apigee\Resource; 19 20use Google\Service\Apigee\GoogleCloudApigeeV1DataCollector; 21use Google\Service\Apigee\GoogleCloudApigeeV1ListDataCollectorsResponse; 22use Google\Service\Apigee\GoogleProtobufEmpty; 23 24/** 25 * The "datacollectors" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $apigeeService = new Google\Service\Apigee(...); 29 * $datacollectors = $apigeeService->datacollectors; 30 * </code> 31 */ 32class OrganizationsDatacollectors extends \Google\Service\Resource 33{ 34 /** 35 * Creates a new data collector. (datacollectors.create) 36 * 37 * @param string $parent Required. Name of the organization in which to create 38 * the data collector in the following format: `organizations/{org}`. 39 * @param GoogleCloudApigeeV1DataCollector $postBody 40 * @param array $optParams Optional parameters. 41 * 42 * @opt_param string dataCollectorId ID of the data collector. Overrides any ID 43 * in the data collector resource. Must be a string beginning with `dc_` that 44 * contains only letters, numbers, and underscores. 45 * @return GoogleCloudApigeeV1DataCollector 46 */ 47 public function create($parent, GoogleCloudApigeeV1DataCollector $postBody, $optParams = []) 48 { 49 $params = ['parent' => $parent, 'postBody' => $postBody]; 50 $params = array_merge($params, $optParams); 51 return $this->call('create', [$params], GoogleCloudApigeeV1DataCollector::class); 52 } 53 /** 54 * Deletes a data collector. (datacollectors.delete) 55 * 56 * @param string $name Required. Name of the data collector in the following 57 * format: `organizations/{org}/datacollectors/{data_collector_id}`. 58 * @param array $optParams Optional parameters. 59 * @return GoogleProtobufEmpty 60 */ 61 public function delete($name, $optParams = []) 62 { 63 $params = ['name' => $name]; 64 $params = array_merge($params, $optParams); 65 return $this->call('delete', [$params], GoogleProtobufEmpty::class); 66 } 67 /** 68 * Gets a data collector. (datacollectors.get) 69 * 70 * @param string $name Required. Name of the data collector in the following 71 * format: `organizations/{org}/datacollectors/{data_collector_id}`. 72 * @param array $optParams Optional parameters. 73 * @return GoogleCloudApigeeV1DataCollector 74 */ 75 public function get($name, $optParams = []) 76 { 77 $params = ['name' => $name]; 78 $params = array_merge($params, $optParams); 79 return $this->call('get', [$params], GoogleCloudApigeeV1DataCollector::class); 80 } 81 /** 82 * Lists all data collectors. (datacollectors.listOrganizationsDatacollectors) 83 * 84 * @param string $parent Required. Name of the organization for which to list 85 * data collectors in the following format: `organizations/{org}`. 86 * @param array $optParams Optional parameters. 87 * 88 * @opt_param int pageSize Maximum number of data collectors to return. The page 89 * size defaults to 25. 90 * @opt_param string pageToken Page token, returned from a previous 91 * ListDataCollectors call, that you can use to retrieve the next page. 92 * @return GoogleCloudApigeeV1ListDataCollectorsResponse 93 */ 94 public function listOrganizationsDatacollectors($parent, $optParams = []) 95 { 96 $params = ['parent' => $parent]; 97 $params = array_merge($params, $optParams); 98 return $this->call('list', [$params], GoogleCloudApigeeV1ListDataCollectorsResponse::class); 99 } 100 /** 101 * Updates a data collector. (datacollectors.patch) 102 * 103 * @param string $name Required. Name of the data collector in the following 104 * format: `organizations/{org}/datacollectors/{data_collector_id}`. 105 * @param GoogleCloudApigeeV1DataCollector $postBody 106 * @param array $optParams Optional parameters. 107 * 108 * @opt_param string updateMask List of fields to be updated. 109 * @return GoogleCloudApigeeV1DataCollector 110 */ 111 public function patch($name, GoogleCloudApigeeV1DataCollector $postBody, $optParams = []) 112 { 113 $params = ['name' => $name, 'postBody' => $postBody]; 114 $params = array_merge($params, $optParams); 115 return $this->call('patch', [$params], GoogleCloudApigeeV1DataCollector::class); 116 } 117} 118 119// Adding a class alias for backwards compatibility with the previous class name. 120class_alias(OrganizationsDatacollectors::class, 'Google_Service_Apigee_Resource_OrganizationsDatacollectors'); 121