in src/Ess/V20140828/EssApiResolver.php [4771:4850]
public function withInitContainer(array $initContainer)
{
$this->data['InitContainer'] = $initContainer;
foreach ($initContainer as $depth1 => $depth1Value) {
if(isset($depth1Value['Image'])){
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.Image'] = $depth1Value['Image'];
}
foreach ($depth1Value['InitContainerEnvironmentVar'] as $depth2 => $depth2Value) {
if(isset($depth2Value['FieldRefFieldPath'])){
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.InitContainerEnvironmentVar.' . ($depth2 + 1) . '.FieldRef.FieldPath'] = $depth2Value['FieldRefFieldPath'];
}
if(isset($depth2Value['Value'])){
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.InitContainerEnvironmentVar.' . ($depth2 + 1) . '.Value'] = $depth2Value['Value'];
}
if(isset($depth2Value['Key'])){
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.InitContainerEnvironmentVar.' . ($depth2 + 1) . '.Key'] = $depth2Value['Key'];
}
}
foreach ($depth1Value['SecurityContextCapabilityAdd'] as $i => $iValue) {
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.SecurityContext.Capability.Add.' . ($i + 1)] = $iValue;
}
if(isset($depth1Value['Memory'])){
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.Memory'] = $depth1Value['Memory'];
}
if(isset($depth1Value['WorkingDir'])){
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.WorkingDir'] = $depth1Value['WorkingDir'];
}
if(isset($depth1Value['Cpu'])){
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.Cpu'] = $depth1Value['Cpu'];
}
if(isset($depth1Value['Gpu'])){
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.Gpu'] = $depth1Value['Gpu'];
}
if(isset($depth1Value['ImagePullPolicy'])){
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.ImagePullPolicy'] = $depth1Value['ImagePullPolicy'];
}
foreach ($depth1Value['Command'] as $i => $iValue) {
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.Command.' . ($i + 1)] = $iValue;
}
if(isset($depth1Value['SecurityContextRunAsUser'])){
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.SecurityContext.RunAsUser'] = $depth1Value['SecurityContextRunAsUser'];
}
foreach ($depth1Value['InitContainerPort'] as $depth2 => $depth2Value) {
if(isset($depth2Value['Protocol'])){
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.InitContainerPort.' . ($depth2 + 1) . '.Protocol'] = $depth2Value['Protocol'];
}
if(isset($depth2Value['Port'])){
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.InitContainerPort.' . ($depth2 + 1) . '.Port'] = $depth2Value['Port'];
}
}
foreach ($depth1Value['Arg'] as $i => $iValue) {
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.Arg.' . ($i + 1)] = $iValue;
}
if(isset($depth1Value['Name'])){
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.Name'] = $depth1Value['Name'];
}
foreach ($depth1Value['InitContainerVolumeMount'] as $depth2 => $depth2Value) {
if(isset($depth2Value['MountPath'])){
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.InitContainerVolumeMount.' . ($depth2 + 1) . '.MountPath'] = $depth2Value['MountPath'];
}
if(isset($depth2Value['ReadOnly'])){
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.InitContainerVolumeMount.' . ($depth2 + 1) . '.ReadOnly'] = $depth2Value['ReadOnly'];
}
if(isset($depth2Value['MountPropagation'])){
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.InitContainerVolumeMount.' . ($depth2 + 1) . '.MountPropagation'] = $depth2Value['MountPropagation'];
}
if(isset($depth2Value['Name'])){
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.InitContainerVolumeMount.' . ($depth2 + 1) . '.Name'] = $depth2Value['Name'];
}
if(isset($depth2Value['SubPath'])){
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.InitContainerVolumeMount.' . ($depth2 + 1) . '.SubPath'] = $depth2Value['SubPath'];
}
}
if(isset($depth1Value['SecurityContextReadOnlyRootFilesystem'])){
$this->options['query']['InitContainer.' . ($depth1 + 1) . '.SecurityContext.ReadOnlyRootFilesystem'] = $depth1Value['SecurityContextReadOnlyRootFilesystem'];
}
}
return $this;
}