public function withInitContainer()

in src/Eci/V20180808/EciApiResolver.php [279:321]


    public function withInitContainer(array $initContainer)
    {
        $this->data['InitContainer'] = $initContainer;
        foreach ($initContainer as $depth1 => $depth1Value) {
            $this->options['query']['InitContainer.' . ($depth1 + 1) . '.Name'] = $depth1Value['Name'];
            $this->options['query']['InitContainer.' . ($depth1 + 1) . '.Image'] = $depth1Value['Image'];
            $this->options['query']['InitContainer.' . ($depth1 + 1) . '.Cpu'] = $depth1Value['Cpu'];
            $this->options['query']['InitContainer.' . ($depth1 + 1) . '.Memory'] = $depth1Value['Memory'];
            $this->options['query']['InitContainer.' . ($depth1 + 1) . '.WorkingDir'] = $depth1Value['WorkingDir'];
            $this->options['query']['InitContainer.' . ($depth1 + 1) . '.ImagePullPolicy'] = $depth1Value['ImagePullPolicy'];
            $this->options['query']['InitContainer.' . ($depth1 + 1) . '.Stdin'] = $depth1Value['Stdin'];
            $this->options['query']['InitContainer.' . ($depth1 + 1) . '.StdinOnce'] = $depth1Value['StdinOnce'];
            $this->options['query']['InitContainer.' . ($depth1 + 1) . '.Tty'] = $depth1Value['Tty'];
            foreach ($depth1Value['Command'] as $i => $iValue) {
                $this->options['query']['InitContainer.' . ($depth1 + 1) . '.Command.' . ($i + 1)] = $iValue;
            }
            foreach ($depth1Value['Arg'] as $i => $iValue) {
                $this->options['query']['InitContainer.' . ($depth1 + 1) . '.Arg.' . ($i + 1)] = $iValue;
            }
            foreach ($depth1Value['EnvironmentVar'] as $depth2 => $depth2Value) {
                $this->options['query']['InitContainer.' . ($depth1 + 1) . '.EnvironmentVar.' . ($depth2 + 1) . '.Key'] = $depth2Value['Key'];
                $this->options['query']['InitContainer.' . ($depth1 + 1) . '.EnvironmentVar.' . ($depth2 + 1) . '.Value'] = $depth2Value['Value'];
            }
            foreach ($depth1Value['Port'] as $depth2 => $depth2Value) {
                $this->options['query']['InitContainer.' . ($depth1 + 1) . '.Port.' . ($depth2 + 1) . '.Port'] = $depth2Value['Port'];
                $this->options['query']['InitContainer.' . ($depth1 + 1) . '.Port.' . ($depth2 + 1) . '.Protocol'] = $depth2Value['Protocol'];
            }
            foreach ($depth1Value['VolumeMount'] as $depth2 => $depth2Value) {
                $this->options['query']['InitContainer.' . ($depth1 + 1) . '.VolumeMount.' . ($depth2 + 1) . '.Name'] = $depth2Value['Name'];
                $this->options['query']['InitContainer.' . ($depth1 + 1) . '.VolumeMount.' . ($depth2 + 1) . '.MountPath'] = $depth2Value['MountPath'];
                $this->options['query']['InitContainer.' . ($depth1 + 1) . '.VolumeMount.' . ($depth2 + 1) . '.SubPath'] = $depth2Value['SubPath'];
                $this->options['query']['InitContainer.' . ($depth1 + 1) . '.VolumeMount.' . ($depth2 + 1) . '.ReadOnly'] = $depth2Value['ReadOnly'];
            }
            $this->options['query']['InitContainer.' . ($depth1 + 1) . '.SecurityContext.ReadOnlyRootFilesystem'] = $depth1Value['SecurityContextReadOnlyRootFilesystem'];
            $this->options['query']['InitContainer.' . ($depth1 + 1) . '.SecurityContext.RunAsUser'] = $depth1Value['SecurityContextRunAsUser'];
            foreach ($depth1Value['SecurityContextCapabilityAdd'] as $i => $iValue) {
                $this->options['query']['InitContainer.' . ($depth1 + 1) . '.SecurityContext.Capability.Add.' . ($i + 1)] = $iValue;
            }
            $this->options['query']['InitContainer.' . ($depth1 + 1) . '.Gpu'] = $depth1Value['Gpu'];
        }

        return $this;
    }