public function withEndpointConfigurations()

in src/Ga/V20191120/GaApiResolver.php [961:990]


	public function withEndpointConfigurations(array $endpointConfigurations)
	{
	    $this->data['EndpointConfigurations'] = $endpointConfigurations;
		foreach ($endpointConfigurations as $depth1 => $depth1Value) {
			if(isset($depth1Value['Type'])){
				$this->options['query']['EndpointConfigurations.' . ($depth1 + 1) . '.Type'] = $depth1Value['Type'];
			}
			if(isset($depth1Value['Endpoint'])){
				$this->options['query']['EndpointConfigurations.' . ($depth1 + 1) . '.Endpoint'] = $depth1Value['Endpoint'];
			}
			if(isset($depth1Value['TrafficToEndpointPolicy'])){
				$this->options['query']['EndpointConfigurations.' . ($depth1 + 1) . '.TrafficToEndpointPolicy'] = $depth1Value['TrafficToEndpointPolicy'];
			}
			foreach ($depth1Value['PolicyConfigurations'] as $depth2 => $depth2Value) {
				if(isset($depth2Value['Address'])){
					$this->options['query']['EndpointConfigurations.' . ($depth1 + 1) . '.PolicyConfigurations.' . ($depth2 + 1) . '.Address'] = $depth2Value['Address'];
				}
				foreach ($depth2Value['PortRanges'] as $depth3 => $depth3Value) {
					if(isset($depth3Value['FromPort'])){
						$this->options['query']['EndpointConfigurations.' . ($depth1 + 1) . '.PolicyConfigurations.' . ($depth2 + 1) . '.PortRanges.' . ($depth3 + 1) . '.FromPort'] = $depth3Value['FromPort'];
					}
					if(isset($depth3Value['ToPort'])){
						$this->options['query']['EndpointConfigurations.' . ($depth1 + 1) . '.PolicyConfigurations.' . ($depth2 + 1) . '.PortRanges.' . ($depth3 + 1) . '.ToPort'] = $depth3Value['ToPort'];
					}
				}
			}
		}

		return $this;
    }