func UnstructuredToWorkflowTemplate()

in unstructured/google/dataproc/alpha/workflow_template.go [958:2870]


func UnstructuredToWorkflowTemplate(u *unstructured.Resource) (*dclService.WorkflowTemplate, error) {
	r := &dclService.WorkflowTemplate{}
	if _, ok := u.Object["createTime"]; ok {
		if s, ok := u.Object["createTime"].(string); ok {
			r.CreateTime = dcl.String(s)
		} else {
			return nil, fmt.Errorf("r.CreateTime: expected string")
		}
	}
	if _, ok := u.Object["dagTimeout"]; ok {
		if s, ok := u.Object["dagTimeout"].(string); ok {
			r.DagTimeout = dcl.String(s)
		} else {
			return nil, fmt.Errorf("r.DagTimeout: expected string")
		}
	}
	if _, ok := u.Object["encryptionConfig"]; ok {
		if rEncryptionConfig, ok := u.Object["encryptionConfig"].(map[string]interface{}); ok {
			r.EncryptionConfig = &dclService.WorkflowTemplateEncryptionConfig{}
			if _, ok := rEncryptionConfig["kmsKey"]; ok {
				if s, ok := rEncryptionConfig["kmsKey"].(string); ok {
					r.EncryptionConfig.KmsKey = dcl.String(s)
				} else {
					return nil, fmt.Errorf("r.EncryptionConfig.KmsKey: expected string")
				}
			}
		} else {
			return nil, fmt.Errorf("r.EncryptionConfig: expected map[string]interface{}")
		}
	}
	if _, ok := u.Object["jobs"]; ok {
		if s, ok := u.Object["jobs"].([]interface{}); ok {
			for _, o := range s {
				if objval, ok := o.(map[string]interface{}); ok {
					var rJobs dclService.WorkflowTemplateJobs
					if _, ok := objval["hadoopJob"]; ok {
						if rJobsHadoopJob, ok := objval["hadoopJob"].(map[string]interface{}); ok {
							rJobs.HadoopJob = &dclService.WorkflowTemplateJobsHadoopJob{}
							if _, ok := rJobsHadoopJob["archiveUris"]; ok {
								if s, ok := rJobsHadoopJob["archiveUris"].([]interface{}); ok {
									for _, ss := range s {
										if strval, ok := ss.(string); ok {
											rJobs.HadoopJob.ArchiveUris = append(rJobs.HadoopJob.ArchiveUris, strval)
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.HadoopJob.ArchiveUris: expected []interface{}")
								}
							}
							if _, ok := rJobsHadoopJob["args"]; ok {
								if s, ok := rJobsHadoopJob["args"].([]interface{}); ok {
									for _, ss := range s {
										if strval, ok := ss.(string); ok {
											rJobs.HadoopJob.Args = append(rJobs.HadoopJob.Args, strval)
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.HadoopJob.Args: expected []interface{}")
								}
							}
							if _, ok := rJobsHadoopJob["fileUris"]; ok {
								if s, ok := rJobsHadoopJob["fileUris"].([]interface{}); ok {
									for _, ss := range s {
										if strval, ok := ss.(string); ok {
											rJobs.HadoopJob.FileUris = append(rJobs.HadoopJob.FileUris, strval)
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.HadoopJob.FileUris: expected []interface{}")
								}
							}
							if _, ok := rJobsHadoopJob["jarFileUris"]; ok {
								if s, ok := rJobsHadoopJob["jarFileUris"].([]interface{}); ok {
									for _, ss := range s {
										if strval, ok := ss.(string); ok {
											rJobs.HadoopJob.JarFileUris = append(rJobs.HadoopJob.JarFileUris, strval)
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.HadoopJob.JarFileUris: expected []interface{}")
								}
							}
							if _, ok := rJobsHadoopJob["loggingConfig"]; ok {
								if rJobsHadoopJobLoggingConfig, ok := rJobsHadoopJob["loggingConfig"].(map[string]interface{}); ok {
									rJobs.HadoopJob.LoggingConfig = &dclService.WorkflowTemplateJobsHadoopJobLoggingConfig{}
									if _, ok := rJobsHadoopJobLoggingConfig["driverLogLevels"]; ok {
										if rJobsHadoopJobLoggingConfigDriverLogLevels, ok := rJobsHadoopJobLoggingConfig["driverLogLevels"].(map[string]interface{}); ok {
											m := make(map[string]string)
											for k, v := range rJobsHadoopJobLoggingConfigDriverLogLevels {
												if s, ok := v.(string); ok {
													m[k] = s
												}
											}
											rJobs.HadoopJob.LoggingConfig.DriverLogLevels = m
										} else {
											return nil, fmt.Errorf("rJobs.HadoopJob.LoggingConfig.DriverLogLevels: expected map[string]interface{}")
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.HadoopJob.LoggingConfig: expected map[string]interface{}")
								}
							}
							if _, ok := rJobsHadoopJob["mainClass"]; ok {
								if s, ok := rJobsHadoopJob["mainClass"].(string); ok {
									rJobs.HadoopJob.MainClass = dcl.String(s)
								} else {
									return nil, fmt.Errorf("rJobs.HadoopJob.MainClass: expected string")
								}
							}
							if _, ok := rJobsHadoopJob["mainJarFileUri"]; ok {
								if s, ok := rJobsHadoopJob["mainJarFileUri"].(string); ok {
									rJobs.HadoopJob.MainJarFileUri = dcl.String(s)
								} else {
									return nil, fmt.Errorf("rJobs.HadoopJob.MainJarFileUri: expected string")
								}
							}
							if _, ok := rJobsHadoopJob["properties"]; ok {
								if rJobsHadoopJobProperties, ok := rJobsHadoopJob["properties"].(map[string]interface{}); ok {
									m := make(map[string]string)
									for k, v := range rJobsHadoopJobProperties {
										if s, ok := v.(string); ok {
											m[k] = s
										}
									}
									rJobs.HadoopJob.Properties = m
								} else {
									return nil, fmt.Errorf("rJobs.HadoopJob.Properties: expected map[string]interface{}")
								}
							}
						} else {
							return nil, fmt.Errorf("rJobs.HadoopJob: expected map[string]interface{}")
						}
					}
					if _, ok := objval["hiveJob"]; ok {
						if rJobsHiveJob, ok := objval["hiveJob"].(map[string]interface{}); ok {
							rJobs.HiveJob = &dclService.WorkflowTemplateJobsHiveJob{}
							if _, ok := rJobsHiveJob["continueOnFailure"]; ok {
								if b, ok := rJobsHiveJob["continueOnFailure"].(bool); ok {
									rJobs.HiveJob.ContinueOnFailure = dcl.Bool(b)
								} else {
									return nil, fmt.Errorf("rJobs.HiveJob.ContinueOnFailure: expected bool")
								}
							}
							if _, ok := rJobsHiveJob["jarFileUris"]; ok {
								if s, ok := rJobsHiveJob["jarFileUris"].([]interface{}); ok {
									for _, ss := range s {
										if strval, ok := ss.(string); ok {
											rJobs.HiveJob.JarFileUris = append(rJobs.HiveJob.JarFileUris, strval)
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.HiveJob.JarFileUris: expected []interface{}")
								}
							}
							if _, ok := rJobsHiveJob["properties"]; ok {
								if rJobsHiveJobProperties, ok := rJobsHiveJob["properties"].(map[string]interface{}); ok {
									m := make(map[string]string)
									for k, v := range rJobsHiveJobProperties {
										if s, ok := v.(string); ok {
											m[k] = s
										}
									}
									rJobs.HiveJob.Properties = m
								} else {
									return nil, fmt.Errorf("rJobs.HiveJob.Properties: expected map[string]interface{}")
								}
							}
							if _, ok := rJobsHiveJob["queryFileUri"]; ok {
								if s, ok := rJobsHiveJob["queryFileUri"].(string); ok {
									rJobs.HiveJob.QueryFileUri = dcl.String(s)
								} else {
									return nil, fmt.Errorf("rJobs.HiveJob.QueryFileUri: expected string")
								}
							}
							if _, ok := rJobsHiveJob["queryList"]; ok {
								if rJobsHiveJobQueryList, ok := rJobsHiveJob["queryList"].(map[string]interface{}); ok {
									rJobs.HiveJob.QueryList = &dclService.WorkflowTemplateJobsHiveJobQueryList{}
									if _, ok := rJobsHiveJobQueryList["queries"]; ok {
										if s, ok := rJobsHiveJobQueryList["queries"].([]interface{}); ok {
											for _, ss := range s {
												if strval, ok := ss.(string); ok {
													rJobs.HiveJob.QueryList.Queries = append(rJobs.HiveJob.QueryList.Queries, strval)
												}
											}
										} else {
											return nil, fmt.Errorf("rJobs.HiveJob.QueryList.Queries: expected []interface{}")
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.HiveJob.QueryList: expected map[string]interface{}")
								}
							}
							if _, ok := rJobsHiveJob["scriptVariables"]; ok {
								if rJobsHiveJobScriptVariables, ok := rJobsHiveJob["scriptVariables"].(map[string]interface{}); ok {
									m := make(map[string]string)
									for k, v := range rJobsHiveJobScriptVariables {
										if s, ok := v.(string); ok {
											m[k] = s
										}
									}
									rJobs.HiveJob.ScriptVariables = m
								} else {
									return nil, fmt.Errorf("rJobs.HiveJob.ScriptVariables: expected map[string]interface{}")
								}
							}
						} else {
							return nil, fmt.Errorf("rJobs.HiveJob: expected map[string]interface{}")
						}
					}
					if _, ok := objval["labels"]; ok {
						if rJobsLabels, ok := objval["labels"].(map[string]interface{}); ok {
							m := make(map[string]string)
							for k, v := range rJobsLabels {
								if s, ok := v.(string); ok {
									m[k] = s
								}
							}
							rJobs.Labels = m
						} else {
							return nil, fmt.Errorf("rJobs.Labels: expected map[string]interface{}")
						}
					}
					if _, ok := objval["pigJob"]; ok {
						if rJobsPigJob, ok := objval["pigJob"].(map[string]interface{}); ok {
							rJobs.PigJob = &dclService.WorkflowTemplateJobsPigJob{}
							if _, ok := rJobsPigJob["continueOnFailure"]; ok {
								if b, ok := rJobsPigJob["continueOnFailure"].(bool); ok {
									rJobs.PigJob.ContinueOnFailure = dcl.Bool(b)
								} else {
									return nil, fmt.Errorf("rJobs.PigJob.ContinueOnFailure: expected bool")
								}
							}
							if _, ok := rJobsPigJob["jarFileUris"]; ok {
								if s, ok := rJobsPigJob["jarFileUris"].([]interface{}); ok {
									for _, ss := range s {
										if strval, ok := ss.(string); ok {
											rJobs.PigJob.JarFileUris = append(rJobs.PigJob.JarFileUris, strval)
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.PigJob.JarFileUris: expected []interface{}")
								}
							}
							if _, ok := rJobsPigJob["loggingConfig"]; ok {
								if rJobsPigJobLoggingConfig, ok := rJobsPigJob["loggingConfig"].(map[string]interface{}); ok {
									rJobs.PigJob.LoggingConfig = &dclService.WorkflowTemplateJobsPigJobLoggingConfig{}
									if _, ok := rJobsPigJobLoggingConfig["driverLogLevels"]; ok {
										if rJobsPigJobLoggingConfigDriverLogLevels, ok := rJobsPigJobLoggingConfig["driverLogLevels"].(map[string]interface{}); ok {
											m := make(map[string]string)
											for k, v := range rJobsPigJobLoggingConfigDriverLogLevels {
												if s, ok := v.(string); ok {
													m[k] = s
												}
											}
											rJobs.PigJob.LoggingConfig.DriverLogLevels = m
										} else {
											return nil, fmt.Errorf("rJobs.PigJob.LoggingConfig.DriverLogLevels: expected map[string]interface{}")
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.PigJob.LoggingConfig: expected map[string]interface{}")
								}
							}
							if _, ok := rJobsPigJob["properties"]; ok {
								if rJobsPigJobProperties, ok := rJobsPigJob["properties"].(map[string]interface{}); ok {
									m := make(map[string]string)
									for k, v := range rJobsPigJobProperties {
										if s, ok := v.(string); ok {
											m[k] = s
										}
									}
									rJobs.PigJob.Properties = m
								} else {
									return nil, fmt.Errorf("rJobs.PigJob.Properties: expected map[string]interface{}")
								}
							}
							if _, ok := rJobsPigJob["queryFileUri"]; ok {
								if s, ok := rJobsPigJob["queryFileUri"].(string); ok {
									rJobs.PigJob.QueryFileUri = dcl.String(s)
								} else {
									return nil, fmt.Errorf("rJobs.PigJob.QueryFileUri: expected string")
								}
							}
							if _, ok := rJobsPigJob["queryList"]; ok {
								if rJobsPigJobQueryList, ok := rJobsPigJob["queryList"].(map[string]interface{}); ok {
									rJobs.PigJob.QueryList = &dclService.WorkflowTemplateJobsPigJobQueryList{}
									if _, ok := rJobsPigJobQueryList["queries"]; ok {
										if s, ok := rJobsPigJobQueryList["queries"].([]interface{}); ok {
											for _, ss := range s {
												if strval, ok := ss.(string); ok {
													rJobs.PigJob.QueryList.Queries = append(rJobs.PigJob.QueryList.Queries, strval)
												}
											}
										} else {
											return nil, fmt.Errorf("rJobs.PigJob.QueryList.Queries: expected []interface{}")
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.PigJob.QueryList: expected map[string]interface{}")
								}
							}
							if _, ok := rJobsPigJob["scriptVariables"]; ok {
								if rJobsPigJobScriptVariables, ok := rJobsPigJob["scriptVariables"].(map[string]interface{}); ok {
									m := make(map[string]string)
									for k, v := range rJobsPigJobScriptVariables {
										if s, ok := v.(string); ok {
											m[k] = s
										}
									}
									rJobs.PigJob.ScriptVariables = m
								} else {
									return nil, fmt.Errorf("rJobs.PigJob.ScriptVariables: expected map[string]interface{}")
								}
							}
						} else {
							return nil, fmt.Errorf("rJobs.PigJob: expected map[string]interface{}")
						}
					}
					if _, ok := objval["prerequisiteStepIds"]; ok {
						if s, ok := objval["prerequisiteStepIds"].([]interface{}); ok {
							for _, ss := range s {
								if strval, ok := ss.(string); ok {
									rJobs.PrerequisiteStepIds = append(rJobs.PrerequisiteStepIds, strval)
								}
							}
						} else {
							return nil, fmt.Errorf("rJobs.PrerequisiteStepIds: expected []interface{}")
						}
					}
					if _, ok := objval["prestoJob"]; ok {
						if rJobsPrestoJob, ok := objval["prestoJob"].(map[string]interface{}); ok {
							rJobs.PrestoJob = &dclService.WorkflowTemplateJobsPrestoJob{}
							if _, ok := rJobsPrestoJob["clientTags"]; ok {
								if s, ok := rJobsPrestoJob["clientTags"].([]interface{}); ok {
									for _, ss := range s {
										if strval, ok := ss.(string); ok {
											rJobs.PrestoJob.ClientTags = append(rJobs.PrestoJob.ClientTags, strval)
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.PrestoJob.ClientTags: expected []interface{}")
								}
							}
							if _, ok := rJobsPrestoJob["continueOnFailure"]; ok {
								if b, ok := rJobsPrestoJob["continueOnFailure"].(bool); ok {
									rJobs.PrestoJob.ContinueOnFailure = dcl.Bool(b)
								} else {
									return nil, fmt.Errorf("rJobs.PrestoJob.ContinueOnFailure: expected bool")
								}
							}
							if _, ok := rJobsPrestoJob["loggingConfig"]; ok {
								if rJobsPrestoJobLoggingConfig, ok := rJobsPrestoJob["loggingConfig"].(map[string]interface{}); ok {
									rJobs.PrestoJob.LoggingConfig = &dclService.WorkflowTemplateJobsPrestoJobLoggingConfig{}
									if _, ok := rJobsPrestoJobLoggingConfig["driverLogLevels"]; ok {
										if rJobsPrestoJobLoggingConfigDriverLogLevels, ok := rJobsPrestoJobLoggingConfig["driverLogLevels"].(map[string]interface{}); ok {
											m := make(map[string]string)
											for k, v := range rJobsPrestoJobLoggingConfigDriverLogLevels {
												if s, ok := v.(string); ok {
													m[k] = s
												}
											}
											rJobs.PrestoJob.LoggingConfig.DriverLogLevels = m
										} else {
											return nil, fmt.Errorf("rJobs.PrestoJob.LoggingConfig.DriverLogLevels: expected map[string]interface{}")
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.PrestoJob.LoggingConfig: expected map[string]interface{}")
								}
							}
							if _, ok := rJobsPrestoJob["outputFormat"]; ok {
								if s, ok := rJobsPrestoJob["outputFormat"].(string); ok {
									rJobs.PrestoJob.OutputFormat = dcl.String(s)
								} else {
									return nil, fmt.Errorf("rJobs.PrestoJob.OutputFormat: expected string")
								}
							}
							if _, ok := rJobsPrestoJob["properties"]; ok {
								if rJobsPrestoJobProperties, ok := rJobsPrestoJob["properties"].(map[string]interface{}); ok {
									m := make(map[string]string)
									for k, v := range rJobsPrestoJobProperties {
										if s, ok := v.(string); ok {
											m[k] = s
										}
									}
									rJobs.PrestoJob.Properties = m
								} else {
									return nil, fmt.Errorf("rJobs.PrestoJob.Properties: expected map[string]interface{}")
								}
							}
							if _, ok := rJobsPrestoJob["queryFileUri"]; ok {
								if s, ok := rJobsPrestoJob["queryFileUri"].(string); ok {
									rJobs.PrestoJob.QueryFileUri = dcl.String(s)
								} else {
									return nil, fmt.Errorf("rJobs.PrestoJob.QueryFileUri: expected string")
								}
							}
							if _, ok := rJobsPrestoJob["queryList"]; ok {
								if rJobsPrestoJobQueryList, ok := rJobsPrestoJob["queryList"].(map[string]interface{}); ok {
									rJobs.PrestoJob.QueryList = &dclService.WorkflowTemplateJobsPrestoJobQueryList{}
									if _, ok := rJobsPrestoJobQueryList["queries"]; ok {
										if s, ok := rJobsPrestoJobQueryList["queries"].([]interface{}); ok {
											for _, ss := range s {
												if strval, ok := ss.(string); ok {
													rJobs.PrestoJob.QueryList.Queries = append(rJobs.PrestoJob.QueryList.Queries, strval)
												}
											}
										} else {
											return nil, fmt.Errorf("rJobs.PrestoJob.QueryList.Queries: expected []interface{}")
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.PrestoJob.QueryList: expected map[string]interface{}")
								}
							}
						} else {
							return nil, fmt.Errorf("rJobs.PrestoJob: expected map[string]interface{}")
						}
					}
					if _, ok := objval["pysparkJob"]; ok {
						if rJobsPysparkJob, ok := objval["pysparkJob"].(map[string]interface{}); ok {
							rJobs.PysparkJob = &dclService.WorkflowTemplateJobsPysparkJob{}
							if _, ok := rJobsPysparkJob["archiveUris"]; ok {
								if s, ok := rJobsPysparkJob["archiveUris"].([]interface{}); ok {
									for _, ss := range s {
										if strval, ok := ss.(string); ok {
											rJobs.PysparkJob.ArchiveUris = append(rJobs.PysparkJob.ArchiveUris, strval)
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.PysparkJob.ArchiveUris: expected []interface{}")
								}
							}
							if _, ok := rJobsPysparkJob["args"]; ok {
								if s, ok := rJobsPysparkJob["args"].([]interface{}); ok {
									for _, ss := range s {
										if strval, ok := ss.(string); ok {
											rJobs.PysparkJob.Args = append(rJobs.PysparkJob.Args, strval)
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.PysparkJob.Args: expected []interface{}")
								}
							}
							if _, ok := rJobsPysparkJob["fileUris"]; ok {
								if s, ok := rJobsPysparkJob["fileUris"].([]interface{}); ok {
									for _, ss := range s {
										if strval, ok := ss.(string); ok {
											rJobs.PysparkJob.FileUris = append(rJobs.PysparkJob.FileUris, strval)
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.PysparkJob.FileUris: expected []interface{}")
								}
							}
							if _, ok := rJobsPysparkJob["jarFileUris"]; ok {
								if s, ok := rJobsPysparkJob["jarFileUris"].([]interface{}); ok {
									for _, ss := range s {
										if strval, ok := ss.(string); ok {
											rJobs.PysparkJob.JarFileUris = append(rJobs.PysparkJob.JarFileUris, strval)
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.PysparkJob.JarFileUris: expected []interface{}")
								}
							}
							if _, ok := rJobsPysparkJob["loggingConfig"]; ok {
								if rJobsPysparkJobLoggingConfig, ok := rJobsPysparkJob["loggingConfig"].(map[string]interface{}); ok {
									rJobs.PysparkJob.LoggingConfig = &dclService.WorkflowTemplateJobsPysparkJobLoggingConfig{}
									if _, ok := rJobsPysparkJobLoggingConfig["driverLogLevels"]; ok {
										if rJobsPysparkJobLoggingConfigDriverLogLevels, ok := rJobsPysparkJobLoggingConfig["driverLogLevels"].(map[string]interface{}); ok {
											m := make(map[string]string)
											for k, v := range rJobsPysparkJobLoggingConfigDriverLogLevels {
												if s, ok := v.(string); ok {
													m[k] = s
												}
											}
											rJobs.PysparkJob.LoggingConfig.DriverLogLevels = m
										} else {
											return nil, fmt.Errorf("rJobs.PysparkJob.LoggingConfig.DriverLogLevels: expected map[string]interface{}")
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.PysparkJob.LoggingConfig: expected map[string]interface{}")
								}
							}
							if _, ok := rJobsPysparkJob["mainPythonFileUri"]; ok {
								if s, ok := rJobsPysparkJob["mainPythonFileUri"].(string); ok {
									rJobs.PysparkJob.MainPythonFileUri = dcl.String(s)
								} else {
									return nil, fmt.Errorf("rJobs.PysparkJob.MainPythonFileUri: expected string")
								}
							}
							if _, ok := rJobsPysparkJob["properties"]; ok {
								if rJobsPysparkJobProperties, ok := rJobsPysparkJob["properties"].(map[string]interface{}); ok {
									m := make(map[string]string)
									for k, v := range rJobsPysparkJobProperties {
										if s, ok := v.(string); ok {
											m[k] = s
										}
									}
									rJobs.PysparkJob.Properties = m
								} else {
									return nil, fmt.Errorf("rJobs.PysparkJob.Properties: expected map[string]interface{}")
								}
							}
							if _, ok := rJobsPysparkJob["pythonFileUris"]; ok {
								if s, ok := rJobsPysparkJob["pythonFileUris"].([]interface{}); ok {
									for _, ss := range s {
										if strval, ok := ss.(string); ok {
											rJobs.PysparkJob.PythonFileUris = append(rJobs.PysparkJob.PythonFileUris, strval)
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.PysparkJob.PythonFileUris: expected []interface{}")
								}
							}
						} else {
							return nil, fmt.Errorf("rJobs.PysparkJob: expected map[string]interface{}")
						}
					}
					if _, ok := objval["scheduling"]; ok {
						if rJobsScheduling, ok := objval["scheduling"].(map[string]interface{}); ok {
							rJobs.Scheduling = &dclService.WorkflowTemplateJobsScheduling{}
							if _, ok := rJobsScheduling["maxFailuresPerHour"]; ok {
								if i, ok := rJobsScheduling["maxFailuresPerHour"].(int64); ok {
									rJobs.Scheduling.MaxFailuresPerHour = dcl.Int64(i)
								} else {
									return nil, fmt.Errorf("rJobs.Scheduling.MaxFailuresPerHour: expected int64")
								}
							}
							if _, ok := rJobsScheduling["maxFailuresTotal"]; ok {
								if i, ok := rJobsScheduling["maxFailuresTotal"].(int64); ok {
									rJobs.Scheduling.MaxFailuresTotal = dcl.Int64(i)
								} else {
									return nil, fmt.Errorf("rJobs.Scheduling.MaxFailuresTotal: expected int64")
								}
							}
						} else {
							return nil, fmt.Errorf("rJobs.Scheduling: expected map[string]interface{}")
						}
					}
					if _, ok := objval["sparkJob"]; ok {
						if rJobsSparkJob, ok := objval["sparkJob"].(map[string]interface{}); ok {
							rJobs.SparkJob = &dclService.WorkflowTemplateJobsSparkJob{}
							if _, ok := rJobsSparkJob["archiveUris"]; ok {
								if s, ok := rJobsSparkJob["archiveUris"].([]interface{}); ok {
									for _, ss := range s {
										if strval, ok := ss.(string); ok {
											rJobs.SparkJob.ArchiveUris = append(rJobs.SparkJob.ArchiveUris, strval)
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.SparkJob.ArchiveUris: expected []interface{}")
								}
							}
							if _, ok := rJobsSparkJob["args"]; ok {
								if s, ok := rJobsSparkJob["args"].([]interface{}); ok {
									for _, ss := range s {
										if strval, ok := ss.(string); ok {
											rJobs.SparkJob.Args = append(rJobs.SparkJob.Args, strval)
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.SparkJob.Args: expected []interface{}")
								}
							}
							if _, ok := rJobsSparkJob["fileUris"]; ok {
								if s, ok := rJobsSparkJob["fileUris"].([]interface{}); ok {
									for _, ss := range s {
										if strval, ok := ss.(string); ok {
											rJobs.SparkJob.FileUris = append(rJobs.SparkJob.FileUris, strval)
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.SparkJob.FileUris: expected []interface{}")
								}
							}
							if _, ok := rJobsSparkJob["jarFileUris"]; ok {
								if s, ok := rJobsSparkJob["jarFileUris"].([]interface{}); ok {
									for _, ss := range s {
										if strval, ok := ss.(string); ok {
											rJobs.SparkJob.JarFileUris = append(rJobs.SparkJob.JarFileUris, strval)
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.SparkJob.JarFileUris: expected []interface{}")
								}
							}
							if _, ok := rJobsSparkJob["loggingConfig"]; ok {
								if rJobsSparkJobLoggingConfig, ok := rJobsSparkJob["loggingConfig"].(map[string]interface{}); ok {
									rJobs.SparkJob.LoggingConfig = &dclService.WorkflowTemplateJobsSparkJobLoggingConfig{}
									if _, ok := rJobsSparkJobLoggingConfig["driverLogLevels"]; ok {
										if rJobsSparkJobLoggingConfigDriverLogLevels, ok := rJobsSparkJobLoggingConfig["driverLogLevels"].(map[string]interface{}); ok {
											m := make(map[string]string)
											for k, v := range rJobsSparkJobLoggingConfigDriverLogLevels {
												if s, ok := v.(string); ok {
													m[k] = s
												}
											}
											rJobs.SparkJob.LoggingConfig.DriverLogLevels = m
										} else {
											return nil, fmt.Errorf("rJobs.SparkJob.LoggingConfig.DriverLogLevels: expected map[string]interface{}")
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.SparkJob.LoggingConfig: expected map[string]interface{}")
								}
							}
							if _, ok := rJobsSparkJob["mainClass"]; ok {
								if s, ok := rJobsSparkJob["mainClass"].(string); ok {
									rJobs.SparkJob.MainClass = dcl.String(s)
								} else {
									return nil, fmt.Errorf("rJobs.SparkJob.MainClass: expected string")
								}
							}
							if _, ok := rJobsSparkJob["mainJarFileUri"]; ok {
								if s, ok := rJobsSparkJob["mainJarFileUri"].(string); ok {
									rJobs.SparkJob.MainJarFileUri = dcl.String(s)
								} else {
									return nil, fmt.Errorf("rJobs.SparkJob.MainJarFileUri: expected string")
								}
							}
							if _, ok := rJobsSparkJob["properties"]; ok {
								if rJobsSparkJobProperties, ok := rJobsSparkJob["properties"].(map[string]interface{}); ok {
									m := make(map[string]string)
									for k, v := range rJobsSparkJobProperties {
										if s, ok := v.(string); ok {
											m[k] = s
										}
									}
									rJobs.SparkJob.Properties = m
								} else {
									return nil, fmt.Errorf("rJobs.SparkJob.Properties: expected map[string]interface{}")
								}
							}
						} else {
							return nil, fmt.Errorf("rJobs.SparkJob: expected map[string]interface{}")
						}
					}
					if _, ok := objval["sparkRJob"]; ok {
						if rJobsSparkRJob, ok := objval["sparkRJob"].(map[string]interface{}); ok {
							rJobs.SparkRJob = &dclService.WorkflowTemplateJobsSparkRJob{}
							if _, ok := rJobsSparkRJob["archiveUris"]; ok {
								if s, ok := rJobsSparkRJob["archiveUris"].([]interface{}); ok {
									for _, ss := range s {
										if strval, ok := ss.(string); ok {
											rJobs.SparkRJob.ArchiveUris = append(rJobs.SparkRJob.ArchiveUris, strval)
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.SparkRJob.ArchiveUris: expected []interface{}")
								}
							}
							if _, ok := rJobsSparkRJob["args"]; ok {
								if s, ok := rJobsSparkRJob["args"].([]interface{}); ok {
									for _, ss := range s {
										if strval, ok := ss.(string); ok {
											rJobs.SparkRJob.Args = append(rJobs.SparkRJob.Args, strval)
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.SparkRJob.Args: expected []interface{}")
								}
							}
							if _, ok := rJobsSparkRJob["fileUris"]; ok {
								if s, ok := rJobsSparkRJob["fileUris"].([]interface{}); ok {
									for _, ss := range s {
										if strval, ok := ss.(string); ok {
											rJobs.SparkRJob.FileUris = append(rJobs.SparkRJob.FileUris, strval)
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.SparkRJob.FileUris: expected []interface{}")
								}
							}
							if _, ok := rJobsSparkRJob["loggingConfig"]; ok {
								if rJobsSparkRJobLoggingConfig, ok := rJobsSparkRJob["loggingConfig"].(map[string]interface{}); ok {
									rJobs.SparkRJob.LoggingConfig = &dclService.WorkflowTemplateJobsSparkRJobLoggingConfig{}
									if _, ok := rJobsSparkRJobLoggingConfig["driverLogLevels"]; ok {
										if rJobsSparkRJobLoggingConfigDriverLogLevels, ok := rJobsSparkRJobLoggingConfig["driverLogLevels"].(map[string]interface{}); ok {
											m := make(map[string]string)
											for k, v := range rJobsSparkRJobLoggingConfigDriverLogLevels {
												if s, ok := v.(string); ok {
													m[k] = s
												}
											}
											rJobs.SparkRJob.LoggingConfig.DriverLogLevels = m
										} else {
											return nil, fmt.Errorf("rJobs.SparkRJob.LoggingConfig.DriverLogLevels: expected map[string]interface{}")
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.SparkRJob.LoggingConfig: expected map[string]interface{}")
								}
							}
							if _, ok := rJobsSparkRJob["mainRFileUri"]; ok {
								if s, ok := rJobsSparkRJob["mainRFileUri"].(string); ok {
									rJobs.SparkRJob.MainRFileUri = dcl.String(s)
								} else {
									return nil, fmt.Errorf("rJobs.SparkRJob.MainRFileUri: expected string")
								}
							}
							if _, ok := rJobsSparkRJob["properties"]; ok {
								if rJobsSparkRJobProperties, ok := rJobsSparkRJob["properties"].(map[string]interface{}); ok {
									m := make(map[string]string)
									for k, v := range rJobsSparkRJobProperties {
										if s, ok := v.(string); ok {
											m[k] = s
										}
									}
									rJobs.SparkRJob.Properties = m
								} else {
									return nil, fmt.Errorf("rJobs.SparkRJob.Properties: expected map[string]interface{}")
								}
							}
						} else {
							return nil, fmt.Errorf("rJobs.SparkRJob: expected map[string]interface{}")
						}
					}
					if _, ok := objval["sparkSqlJob"]; ok {
						if rJobsSparkSqlJob, ok := objval["sparkSqlJob"].(map[string]interface{}); ok {
							rJobs.SparkSqlJob = &dclService.WorkflowTemplateJobsSparkSqlJob{}
							if _, ok := rJobsSparkSqlJob["jarFileUris"]; ok {
								if s, ok := rJobsSparkSqlJob["jarFileUris"].([]interface{}); ok {
									for _, ss := range s {
										if strval, ok := ss.(string); ok {
											rJobs.SparkSqlJob.JarFileUris = append(rJobs.SparkSqlJob.JarFileUris, strval)
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.SparkSqlJob.JarFileUris: expected []interface{}")
								}
							}
							if _, ok := rJobsSparkSqlJob["loggingConfig"]; ok {
								if rJobsSparkSqlJobLoggingConfig, ok := rJobsSparkSqlJob["loggingConfig"].(map[string]interface{}); ok {
									rJobs.SparkSqlJob.LoggingConfig = &dclService.WorkflowTemplateJobsSparkSqlJobLoggingConfig{}
									if _, ok := rJobsSparkSqlJobLoggingConfig["driverLogLevels"]; ok {
										if rJobsSparkSqlJobLoggingConfigDriverLogLevels, ok := rJobsSparkSqlJobLoggingConfig["driverLogLevels"].(map[string]interface{}); ok {
											m := make(map[string]string)
											for k, v := range rJobsSparkSqlJobLoggingConfigDriverLogLevels {
												if s, ok := v.(string); ok {
													m[k] = s
												}
											}
											rJobs.SparkSqlJob.LoggingConfig.DriverLogLevels = m
										} else {
											return nil, fmt.Errorf("rJobs.SparkSqlJob.LoggingConfig.DriverLogLevels: expected map[string]interface{}")
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.SparkSqlJob.LoggingConfig: expected map[string]interface{}")
								}
							}
							if _, ok := rJobsSparkSqlJob["properties"]; ok {
								if rJobsSparkSqlJobProperties, ok := rJobsSparkSqlJob["properties"].(map[string]interface{}); ok {
									m := make(map[string]string)
									for k, v := range rJobsSparkSqlJobProperties {
										if s, ok := v.(string); ok {
											m[k] = s
										}
									}
									rJobs.SparkSqlJob.Properties = m
								} else {
									return nil, fmt.Errorf("rJobs.SparkSqlJob.Properties: expected map[string]interface{}")
								}
							}
							if _, ok := rJobsSparkSqlJob["queryFileUri"]; ok {
								if s, ok := rJobsSparkSqlJob["queryFileUri"].(string); ok {
									rJobs.SparkSqlJob.QueryFileUri = dcl.String(s)
								} else {
									return nil, fmt.Errorf("rJobs.SparkSqlJob.QueryFileUri: expected string")
								}
							}
							if _, ok := rJobsSparkSqlJob["queryList"]; ok {
								if rJobsSparkSqlJobQueryList, ok := rJobsSparkSqlJob["queryList"].(map[string]interface{}); ok {
									rJobs.SparkSqlJob.QueryList = &dclService.WorkflowTemplateJobsSparkSqlJobQueryList{}
									if _, ok := rJobsSparkSqlJobQueryList["queries"]; ok {
										if s, ok := rJobsSparkSqlJobQueryList["queries"].([]interface{}); ok {
											for _, ss := range s {
												if strval, ok := ss.(string); ok {
													rJobs.SparkSqlJob.QueryList.Queries = append(rJobs.SparkSqlJob.QueryList.Queries, strval)
												}
											}
										} else {
											return nil, fmt.Errorf("rJobs.SparkSqlJob.QueryList.Queries: expected []interface{}")
										}
									}
								} else {
									return nil, fmt.Errorf("rJobs.SparkSqlJob.QueryList: expected map[string]interface{}")
								}
							}
							if _, ok := rJobsSparkSqlJob["scriptVariables"]; ok {
								if rJobsSparkSqlJobScriptVariables, ok := rJobsSparkSqlJob["scriptVariables"].(map[string]interface{}); ok {
									m := make(map[string]string)
									for k, v := range rJobsSparkSqlJobScriptVariables {
										if s, ok := v.(string); ok {
											m[k] = s
										}
									}
									rJobs.SparkSqlJob.ScriptVariables = m
								} else {
									return nil, fmt.Errorf("rJobs.SparkSqlJob.ScriptVariables: expected map[string]interface{}")
								}
							}
						} else {
							return nil, fmt.Errorf("rJobs.SparkSqlJob: expected map[string]interface{}")
						}
					}
					if _, ok := objval["stepId"]; ok {
						if s, ok := objval["stepId"].(string); ok {
							rJobs.StepId = dcl.String(s)
						} else {
							return nil, fmt.Errorf("rJobs.StepId: expected string")
						}
					}
					r.Jobs = append(r.Jobs, rJobs)
				}
			}
		} else {
			return nil, fmt.Errorf("r.Jobs: expected []interface{}")
		}
	}
	if _, ok := u.Object["labels"]; ok {
		if rLabels, ok := u.Object["labels"].(map[string]interface{}); ok {
			m := make(map[string]string)
			for k, v := range rLabels {
				if s, ok := v.(string); ok {
					m[k] = s
				}
			}
			r.Labels = m
		} else {
			return nil, fmt.Errorf("r.Labels: expected map[string]interface{}")
		}
	}
	if _, ok := u.Object["location"]; ok {
		if s, ok := u.Object["location"].(string); ok {
			r.Location = dcl.String(s)
		} else {
			return nil, fmt.Errorf("r.Location: expected string")
		}
	}
	if _, ok := u.Object["name"]; ok {
		if s, ok := u.Object["name"].(string); ok {
			r.Name = dcl.String(s)
		} else {
			return nil, fmt.Errorf("r.Name: expected string")
		}
	}
	if _, ok := u.Object["parameters"]; ok {
		if s, ok := u.Object["parameters"].([]interface{}); ok {
			for _, o := range s {
				if objval, ok := o.(map[string]interface{}); ok {
					var rParameters dclService.WorkflowTemplateParameters
					if _, ok := objval["description"]; ok {
						if s, ok := objval["description"].(string); ok {
							rParameters.Description = dcl.String(s)
						} else {
							return nil, fmt.Errorf("rParameters.Description: expected string")
						}
					}
					if _, ok := objval["fields"]; ok {
						if s, ok := objval["fields"].([]interface{}); ok {
							for _, ss := range s {
								if strval, ok := ss.(string); ok {
									rParameters.Fields = append(rParameters.Fields, strval)
								}
							}
						} else {
							return nil, fmt.Errorf("rParameters.Fields: expected []interface{}")
						}
					}
					if _, ok := objval["name"]; ok {
						if s, ok := objval["name"].(string); ok {
							rParameters.Name = dcl.String(s)
						} else {
							return nil, fmt.Errorf("rParameters.Name: expected string")
						}
					}
					if _, ok := objval["validation"]; ok {
						if rParametersValidation, ok := objval["validation"].(map[string]interface{}); ok {
							rParameters.Validation = &dclService.WorkflowTemplateParametersValidation{}
							if _, ok := rParametersValidation["regex"]; ok {
								if rParametersValidationRegex, ok := rParametersValidation["regex"].(map[string]interface{}); ok {
									rParameters.Validation.Regex = &dclService.WorkflowTemplateParametersValidationRegex{}
									if _, ok := rParametersValidationRegex["regexes"]; ok {
										if s, ok := rParametersValidationRegex["regexes"].([]interface{}); ok {
											for _, ss := range s {
												if strval, ok := ss.(string); ok {
													rParameters.Validation.Regex.Regexes = append(rParameters.Validation.Regex.Regexes, strval)
												}
											}
										} else {
											return nil, fmt.Errorf("rParameters.Validation.Regex.Regexes: expected []interface{}")
										}
									}
								} else {
									return nil, fmt.Errorf("rParameters.Validation.Regex: expected map[string]interface{}")
								}
							}
							if _, ok := rParametersValidation["values"]; ok {
								if rParametersValidationValues, ok := rParametersValidation["values"].(map[string]interface{}); ok {
									rParameters.Validation.Values = &dclService.WorkflowTemplateParametersValidationValues{}
									if _, ok := rParametersValidationValues["values"]; ok {
										if s, ok := rParametersValidationValues["values"].([]interface{}); ok {
											for _, ss := range s {
												if strval, ok := ss.(string); ok {
													rParameters.Validation.Values.Values = append(rParameters.Validation.Values.Values, strval)
												}
											}
										} else {
											return nil, fmt.Errorf("rParameters.Validation.Values.Values: expected []interface{}")
										}
									}
								} else {
									return nil, fmt.Errorf("rParameters.Validation.Values: expected map[string]interface{}")
								}
							}
						} else {
							return nil, fmt.Errorf("rParameters.Validation: expected map[string]interface{}")
						}
					}
					r.Parameters = append(r.Parameters, rParameters)
				}
			}
		} else {
			return nil, fmt.Errorf("r.Parameters: expected []interface{}")
		}
	}
	if _, ok := u.Object["placement"]; ok {
		if rPlacement, ok := u.Object["placement"].(map[string]interface{}); ok {
			r.Placement = &dclService.WorkflowTemplatePlacement{}
			if _, ok := rPlacement["clusterSelector"]; ok {
				if rPlacementClusterSelector, ok := rPlacement["clusterSelector"].(map[string]interface{}); ok {
					r.Placement.ClusterSelector = &dclService.WorkflowTemplatePlacementClusterSelector{}
					if _, ok := rPlacementClusterSelector["clusterLabels"]; ok {
						if rPlacementClusterSelectorClusterLabels, ok := rPlacementClusterSelector["clusterLabels"].(map[string]interface{}); ok {
							m := make(map[string]string)
							for k, v := range rPlacementClusterSelectorClusterLabels {
								if s, ok := v.(string); ok {
									m[k] = s
								}
							}
							r.Placement.ClusterSelector.ClusterLabels = m
						} else {
							return nil, fmt.Errorf("r.Placement.ClusterSelector.ClusterLabels: expected map[string]interface{}")
						}
					}
					if _, ok := rPlacementClusterSelector["zone"]; ok {
						if s, ok := rPlacementClusterSelector["zone"].(string); ok {
							r.Placement.ClusterSelector.Zone = dcl.String(s)
						} else {
							return nil, fmt.Errorf("r.Placement.ClusterSelector.Zone: expected string")
						}
					}
				} else {
					return nil, fmt.Errorf("r.Placement.ClusterSelector: expected map[string]interface{}")
				}
			}
			if _, ok := rPlacement["managedCluster"]; ok {
				if rPlacementManagedCluster, ok := rPlacement["managedCluster"].(map[string]interface{}); ok {
					r.Placement.ManagedCluster = &dclService.WorkflowTemplatePlacementManagedCluster{}
					if _, ok := rPlacementManagedCluster["clusterName"]; ok {
						if s, ok := rPlacementManagedCluster["clusterName"].(string); ok {
							r.Placement.ManagedCluster.ClusterName = dcl.String(s)
						} else {
							return nil, fmt.Errorf("r.Placement.ManagedCluster.ClusterName: expected string")
						}
					}
					if _, ok := rPlacementManagedCluster["config"]; ok {
						if rPlacementManagedClusterConfig, ok := rPlacementManagedCluster["config"].(map[string]interface{}); ok {
							r.Placement.ManagedCluster.Config = &dclService.WorkflowTemplatePlacementManagedClusterConfig{}
							if _, ok := rPlacementManagedClusterConfig["autoscalingConfig"]; ok {
								if rPlacementManagedClusterConfigAutoscalingConfig, ok := rPlacementManagedClusterConfig["autoscalingConfig"].(map[string]interface{}); ok {
									r.Placement.ManagedCluster.Config.AutoscalingConfig = &dclService.WorkflowTemplatePlacementManagedClusterConfigAutoscalingConfig{}
									if _, ok := rPlacementManagedClusterConfigAutoscalingConfig["policy"]; ok {
										if s, ok := rPlacementManagedClusterConfigAutoscalingConfig["policy"].(string); ok {
											r.Placement.ManagedCluster.Config.AutoscalingConfig.Policy = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.AutoscalingConfig.Policy: expected string")
										}
									}
								} else {
									return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.AutoscalingConfig: expected map[string]interface{}")
								}
							}
							if _, ok := rPlacementManagedClusterConfig["encryptionConfig"]; ok {
								if rPlacementManagedClusterConfigEncryptionConfig, ok := rPlacementManagedClusterConfig["encryptionConfig"].(map[string]interface{}); ok {
									r.Placement.ManagedCluster.Config.EncryptionConfig = &dclService.WorkflowTemplatePlacementManagedClusterConfigEncryptionConfig{}
									if _, ok := rPlacementManagedClusterConfigEncryptionConfig["gcePdKmsKeyName"]; ok {
										if s, ok := rPlacementManagedClusterConfigEncryptionConfig["gcePdKmsKeyName"].(string); ok {
											r.Placement.ManagedCluster.Config.EncryptionConfig.GcePdKmsKeyName = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.EncryptionConfig.GcePdKmsKeyName: expected string")
										}
									}
								} else {
									return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.EncryptionConfig: expected map[string]interface{}")
								}
							}
							if _, ok := rPlacementManagedClusterConfig["endpointConfig"]; ok {
								if rPlacementManagedClusterConfigEndpointConfig, ok := rPlacementManagedClusterConfig["endpointConfig"].(map[string]interface{}); ok {
									r.Placement.ManagedCluster.Config.EndpointConfig = &dclService.WorkflowTemplatePlacementManagedClusterConfigEndpointConfig{}
									if _, ok := rPlacementManagedClusterConfigEndpointConfig["enableHttpPortAccess"]; ok {
										if b, ok := rPlacementManagedClusterConfigEndpointConfig["enableHttpPortAccess"].(bool); ok {
											r.Placement.ManagedCluster.Config.EndpointConfig.EnableHttpPortAccess = dcl.Bool(b)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.EndpointConfig.EnableHttpPortAccess: expected bool")
										}
									}
									if _, ok := rPlacementManagedClusterConfigEndpointConfig["httpPorts"]; ok {
										if rPlacementManagedClusterConfigEndpointConfigHttpPorts, ok := rPlacementManagedClusterConfigEndpointConfig["httpPorts"].(map[string]interface{}); ok {
											m := make(map[string]string)
											for k, v := range rPlacementManagedClusterConfigEndpointConfigHttpPorts {
												if s, ok := v.(string); ok {
													m[k] = s
												}
											}
											r.Placement.ManagedCluster.Config.EndpointConfig.HttpPorts = m
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.EndpointConfig.HttpPorts: expected map[string]interface{}")
										}
									}
								} else {
									return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.EndpointConfig: expected map[string]interface{}")
								}
							}
							if _, ok := rPlacementManagedClusterConfig["gceClusterConfig"]; ok {
								if rPlacementManagedClusterConfigGceClusterConfig, ok := rPlacementManagedClusterConfig["gceClusterConfig"].(map[string]interface{}); ok {
									r.Placement.ManagedCluster.Config.GceClusterConfig = &dclService.WorkflowTemplatePlacementManagedClusterConfigGceClusterConfig{}
									if _, ok := rPlacementManagedClusterConfigGceClusterConfig["internalIPOnly"]; ok {
										if b, ok := rPlacementManagedClusterConfigGceClusterConfig["internalIPOnly"].(bool); ok {
											r.Placement.ManagedCluster.Config.GceClusterConfig.InternalIPOnly = dcl.Bool(b)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GceClusterConfig.InternalIPOnly: expected bool")
										}
									}
									if _, ok := rPlacementManagedClusterConfigGceClusterConfig["metadata"]; ok {
										if rPlacementManagedClusterConfigGceClusterConfigMetadata, ok := rPlacementManagedClusterConfigGceClusterConfig["metadata"].(map[string]interface{}); ok {
											m := make(map[string]string)
											for k, v := range rPlacementManagedClusterConfigGceClusterConfigMetadata {
												if s, ok := v.(string); ok {
													m[k] = s
												}
											}
											r.Placement.ManagedCluster.Config.GceClusterConfig.Metadata = m
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GceClusterConfig.Metadata: expected map[string]interface{}")
										}
									}
									if _, ok := rPlacementManagedClusterConfigGceClusterConfig["network"]; ok {
										if s, ok := rPlacementManagedClusterConfigGceClusterConfig["network"].(string); ok {
											r.Placement.ManagedCluster.Config.GceClusterConfig.Network = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GceClusterConfig.Network: expected string")
										}
									}
									if _, ok := rPlacementManagedClusterConfigGceClusterConfig["nodeGroupAffinity"]; ok {
										if rPlacementManagedClusterConfigGceClusterConfigNodeGroupAffinity, ok := rPlacementManagedClusterConfigGceClusterConfig["nodeGroupAffinity"].(map[string]interface{}); ok {
											r.Placement.ManagedCluster.Config.GceClusterConfig.NodeGroupAffinity = &dclService.WorkflowTemplatePlacementManagedClusterConfigGceClusterConfigNodeGroupAffinity{}
											if _, ok := rPlacementManagedClusterConfigGceClusterConfigNodeGroupAffinity["nodeGroup"]; ok {
												if s, ok := rPlacementManagedClusterConfigGceClusterConfigNodeGroupAffinity["nodeGroup"].(string); ok {
													r.Placement.ManagedCluster.Config.GceClusterConfig.NodeGroupAffinity.NodeGroup = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GceClusterConfig.NodeGroupAffinity.NodeGroup: expected string")
												}
											}
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GceClusterConfig.NodeGroupAffinity: expected map[string]interface{}")
										}
									}
									if _, ok := rPlacementManagedClusterConfigGceClusterConfig["privateIPv6GoogleAccess"]; ok {
										if s, ok := rPlacementManagedClusterConfigGceClusterConfig["privateIPv6GoogleAccess"].(string); ok {
											r.Placement.ManagedCluster.Config.GceClusterConfig.PrivateIPv6GoogleAccess = dclService.WorkflowTemplatePlacementManagedClusterConfigGceClusterConfigPrivateIPv6GoogleAccessEnumRef(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GceClusterConfig.PrivateIPv6GoogleAccess: expected string")
										}
									}
									if _, ok := rPlacementManagedClusterConfigGceClusterConfig["reservationAffinity"]; ok {
										if rPlacementManagedClusterConfigGceClusterConfigReservationAffinity, ok := rPlacementManagedClusterConfigGceClusterConfig["reservationAffinity"].(map[string]interface{}); ok {
											r.Placement.ManagedCluster.Config.GceClusterConfig.ReservationAffinity = &dclService.WorkflowTemplatePlacementManagedClusterConfigGceClusterConfigReservationAffinity{}
											if _, ok := rPlacementManagedClusterConfigGceClusterConfigReservationAffinity["consumeReservationType"]; ok {
												if s, ok := rPlacementManagedClusterConfigGceClusterConfigReservationAffinity["consumeReservationType"].(string); ok {
													r.Placement.ManagedCluster.Config.GceClusterConfig.ReservationAffinity.ConsumeReservationType = dclService.WorkflowTemplatePlacementManagedClusterConfigGceClusterConfigReservationAffinityConsumeReservationTypeEnumRef(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GceClusterConfig.ReservationAffinity.ConsumeReservationType: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigGceClusterConfigReservationAffinity["key"]; ok {
												if s, ok := rPlacementManagedClusterConfigGceClusterConfigReservationAffinity["key"].(string); ok {
													r.Placement.ManagedCluster.Config.GceClusterConfig.ReservationAffinity.Key = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GceClusterConfig.ReservationAffinity.Key: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigGceClusterConfigReservationAffinity["values"]; ok {
												if s, ok := rPlacementManagedClusterConfigGceClusterConfigReservationAffinity["values"].([]interface{}); ok {
													for _, ss := range s {
														if strval, ok := ss.(string); ok {
															r.Placement.ManagedCluster.Config.GceClusterConfig.ReservationAffinity.Values = append(r.Placement.ManagedCluster.Config.GceClusterConfig.ReservationAffinity.Values, strval)
														}
													}
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GceClusterConfig.ReservationAffinity.Values: expected []interface{}")
												}
											}
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GceClusterConfig.ReservationAffinity: expected map[string]interface{}")
										}
									}
									if _, ok := rPlacementManagedClusterConfigGceClusterConfig["serviceAccount"]; ok {
										if s, ok := rPlacementManagedClusterConfigGceClusterConfig["serviceAccount"].(string); ok {
											r.Placement.ManagedCluster.Config.GceClusterConfig.ServiceAccount = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GceClusterConfig.ServiceAccount: expected string")
										}
									}
									if _, ok := rPlacementManagedClusterConfigGceClusterConfig["serviceAccountScopes"]; ok {
										if s, ok := rPlacementManagedClusterConfigGceClusterConfig["serviceAccountScopes"].([]interface{}); ok {
											for _, ss := range s {
												if strval, ok := ss.(string); ok {
													r.Placement.ManagedCluster.Config.GceClusterConfig.ServiceAccountScopes = append(r.Placement.ManagedCluster.Config.GceClusterConfig.ServiceAccountScopes, strval)
												}
											}
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GceClusterConfig.ServiceAccountScopes: expected []interface{}")
										}
									}
									if _, ok := rPlacementManagedClusterConfigGceClusterConfig["shieldedInstanceConfig"]; ok {
										if rPlacementManagedClusterConfigGceClusterConfigShieldedInstanceConfig, ok := rPlacementManagedClusterConfigGceClusterConfig["shieldedInstanceConfig"].(map[string]interface{}); ok {
											r.Placement.ManagedCluster.Config.GceClusterConfig.ShieldedInstanceConfig = &dclService.WorkflowTemplatePlacementManagedClusterConfigGceClusterConfigShieldedInstanceConfig{}
											if _, ok := rPlacementManagedClusterConfigGceClusterConfigShieldedInstanceConfig["enableIntegrityMonitoring"]; ok {
												if b, ok := rPlacementManagedClusterConfigGceClusterConfigShieldedInstanceConfig["enableIntegrityMonitoring"].(bool); ok {
													r.Placement.ManagedCluster.Config.GceClusterConfig.ShieldedInstanceConfig.EnableIntegrityMonitoring = dcl.Bool(b)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GceClusterConfig.ShieldedInstanceConfig.EnableIntegrityMonitoring: expected bool")
												}
											}
											if _, ok := rPlacementManagedClusterConfigGceClusterConfigShieldedInstanceConfig["enableSecureBoot"]; ok {
												if b, ok := rPlacementManagedClusterConfigGceClusterConfigShieldedInstanceConfig["enableSecureBoot"].(bool); ok {
													r.Placement.ManagedCluster.Config.GceClusterConfig.ShieldedInstanceConfig.EnableSecureBoot = dcl.Bool(b)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GceClusterConfig.ShieldedInstanceConfig.EnableSecureBoot: expected bool")
												}
											}
											if _, ok := rPlacementManagedClusterConfigGceClusterConfigShieldedInstanceConfig["enableVtpm"]; ok {
												if b, ok := rPlacementManagedClusterConfigGceClusterConfigShieldedInstanceConfig["enableVtpm"].(bool); ok {
													r.Placement.ManagedCluster.Config.GceClusterConfig.ShieldedInstanceConfig.EnableVtpm = dcl.Bool(b)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GceClusterConfig.ShieldedInstanceConfig.EnableVtpm: expected bool")
												}
											}
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GceClusterConfig.ShieldedInstanceConfig: expected map[string]interface{}")
										}
									}
									if _, ok := rPlacementManagedClusterConfigGceClusterConfig["subnetwork"]; ok {
										if s, ok := rPlacementManagedClusterConfigGceClusterConfig["subnetwork"].(string); ok {
											r.Placement.ManagedCluster.Config.GceClusterConfig.Subnetwork = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GceClusterConfig.Subnetwork: expected string")
										}
									}
									if _, ok := rPlacementManagedClusterConfigGceClusterConfig["tags"]; ok {
										if s, ok := rPlacementManagedClusterConfigGceClusterConfig["tags"].([]interface{}); ok {
											for _, ss := range s {
												if strval, ok := ss.(string); ok {
													r.Placement.ManagedCluster.Config.GceClusterConfig.Tags = append(r.Placement.ManagedCluster.Config.GceClusterConfig.Tags, strval)
												}
											}
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GceClusterConfig.Tags: expected []interface{}")
										}
									}
									if _, ok := rPlacementManagedClusterConfigGceClusterConfig["zone"]; ok {
										if s, ok := rPlacementManagedClusterConfigGceClusterConfig["zone"].(string); ok {
											r.Placement.ManagedCluster.Config.GceClusterConfig.Zone = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GceClusterConfig.Zone: expected string")
										}
									}
								} else {
									return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GceClusterConfig: expected map[string]interface{}")
								}
							}
							if _, ok := rPlacementManagedClusterConfig["gkeClusterConfig"]; ok {
								if rPlacementManagedClusterConfigGkeClusterConfig, ok := rPlacementManagedClusterConfig["gkeClusterConfig"].(map[string]interface{}); ok {
									r.Placement.ManagedCluster.Config.GkeClusterConfig = &dclService.WorkflowTemplatePlacementManagedClusterConfigGkeClusterConfig{}
									if _, ok := rPlacementManagedClusterConfigGkeClusterConfig["namespacedGkeDeploymentTarget"]; ok {
										if rPlacementManagedClusterConfigGkeClusterConfigNamespacedGkeDeploymentTarget, ok := rPlacementManagedClusterConfigGkeClusterConfig["namespacedGkeDeploymentTarget"].(map[string]interface{}); ok {
											r.Placement.ManagedCluster.Config.GkeClusterConfig.NamespacedGkeDeploymentTarget = &dclService.WorkflowTemplatePlacementManagedClusterConfigGkeClusterConfigNamespacedGkeDeploymentTarget{}
											if _, ok := rPlacementManagedClusterConfigGkeClusterConfigNamespacedGkeDeploymentTarget["clusterNamespace"]; ok {
												if s, ok := rPlacementManagedClusterConfigGkeClusterConfigNamespacedGkeDeploymentTarget["clusterNamespace"].(string); ok {
													r.Placement.ManagedCluster.Config.GkeClusterConfig.NamespacedGkeDeploymentTarget.ClusterNamespace = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GkeClusterConfig.NamespacedGkeDeploymentTarget.ClusterNamespace: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigGkeClusterConfigNamespacedGkeDeploymentTarget["targetGkeCluster"]; ok {
												if s, ok := rPlacementManagedClusterConfigGkeClusterConfigNamespacedGkeDeploymentTarget["targetGkeCluster"].(string); ok {
													r.Placement.ManagedCluster.Config.GkeClusterConfig.NamespacedGkeDeploymentTarget.TargetGkeCluster = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GkeClusterConfig.NamespacedGkeDeploymentTarget.TargetGkeCluster: expected string")
												}
											}
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GkeClusterConfig.NamespacedGkeDeploymentTarget: expected map[string]interface{}")
										}
									}
								} else {
									return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.GkeClusterConfig: expected map[string]interface{}")
								}
							}
							if _, ok := rPlacementManagedClusterConfig["initializationActions"]; ok {
								if s, ok := rPlacementManagedClusterConfig["initializationActions"].([]interface{}); ok {
									for _, o := range s {
										if objval, ok := o.(map[string]interface{}); ok {
											var rPlacementManagedClusterConfigInitializationActions dclService.WorkflowTemplatePlacementManagedClusterConfigInitializationActions
											if _, ok := objval["executableFile"]; ok {
												if s, ok := objval["executableFile"].(string); ok {
													rPlacementManagedClusterConfigInitializationActions.ExecutableFile = dcl.String(s)
												} else {
													return nil, fmt.Errorf("rPlacementManagedClusterConfigInitializationActions.ExecutableFile: expected string")
												}
											}
											if _, ok := objval["executionTimeout"]; ok {
												if s, ok := objval["executionTimeout"].(string); ok {
													rPlacementManagedClusterConfigInitializationActions.ExecutionTimeout = dcl.String(s)
												} else {
													return nil, fmt.Errorf("rPlacementManagedClusterConfigInitializationActions.ExecutionTimeout: expected string")
												}
											}
											r.Placement.ManagedCluster.Config.InitializationActions = append(r.Placement.ManagedCluster.Config.InitializationActions, rPlacementManagedClusterConfigInitializationActions)
										}
									}
								} else {
									return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.InitializationActions: expected []interface{}")
								}
							}
							if _, ok := rPlacementManagedClusterConfig["lifecycleConfig"]; ok {
								if rPlacementManagedClusterConfigLifecycleConfig, ok := rPlacementManagedClusterConfig["lifecycleConfig"].(map[string]interface{}); ok {
									r.Placement.ManagedCluster.Config.LifecycleConfig = &dclService.WorkflowTemplatePlacementManagedClusterConfigLifecycleConfig{}
									if _, ok := rPlacementManagedClusterConfigLifecycleConfig["autoDeleteTime"]; ok {
										if s, ok := rPlacementManagedClusterConfigLifecycleConfig["autoDeleteTime"].(string); ok {
											r.Placement.ManagedCluster.Config.LifecycleConfig.AutoDeleteTime = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.LifecycleConfig.AutoDeleteTime: expected string")
										}
									}
									if _, ok := rPlacementManagedClusterConfigLifecycleConfig["autoDeleteTtl"]; ok {
										if s, ok := rPlacementManagedClusterConfigLifecycleConfig["autoDeleteTtl"].(string); ok {
											r.Placement.ManagedCluster.Config.LifecycleConfig.AutoDeleteTtl = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.LifecycleConfig.AutoDeleteTtl: expected string")
										}
									}
									if _, ok := rPlacementManagedClusterConfigLifecycleConfig["idleDeleteTtl"]; ok {
										if s, ok := rPlacementManagedClusterConfigLifecycleConfig["idleDeleteTtl"].(string); ok {
											r.Placement.ManagedCluster.Config.LifecycleConfig.IdleDeleteTtl = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.LifecycleConfig.IdleDeleteTtl: expected string")
										}
									}
									if _, ok := rPlacementManagedClusterConfigLifecycleConfig["idleStartTime"]; ok {
										if s, ok := rPlacementManagedClusterConfigLifecycleConfig["idleStartTime"].(string); ok {
											r.Placement.ManagedCluster.Config.LifecycleConfig.IdleStartTime = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.LifecycleConfig.IdleStartTime: expected string")
										}
									}
								} else {
									return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.LifecycleConfig: expected map[string]interface{}")
								}
							}
							if _, ok := rPlacementManagedClusterConfig["masterConfig"]; ok {
								if rPlacementManagedClusterConfigMasterConfig, ok := rPlacementManagedClusterConfig["masterConfig"].(map[string]interface{}); ok {
									r.Placement.ManagedCluster.Config.MasterConfig = &dclService.WorkflowTemplatePlacementManagedClusterConfigMasterConfig{}
									if _, ok := rPlacementManagedClusterConfigMasterConfig["accelerators"]; ok {
										if s, ok := rPlacementManagedClusterConfigMasterConfig["accelerators"].([]interface{}); ok {
											for _, o := range s {
												if objval, ok := o.(map[string]interface{}); ok {
													var rPlacementManagedClusterConfigMasterConfigAccelerators dclService.WorkflowTemplatePlacementManagedClusterConfigMasterConfigAccelerators
													if _, ok := objval["acceleratorCount"]; ok {
														if i, ok := objval["acceleratorCount"].(int64); ok {
															rPlacementManagedClusterConfigMasterConfigAccelerators.AcceleratorCount = dcl.Int64(i)
														} else {
															return nil, fmt.Errorf("rPlacementManagedClusterConfigMasterConfigAccelerators.AcceleratorCount: expected int64")
														}
													}
													if _, ok := objval["acceleratorType"]; ok {
														if s, ok := objval["acceleratorType"].(string); ok {
															rPlacementManagedClusterConfigMasterConfigAccelerators.AcceleratorType = dcl.String(s)
														} else {
															return nil, fmt.Errorf("rPlacementManagedClusterConfigMasterConfigAccelerators.AcceleratorType: expected string")
														}
													}
													r.Placement.ManagedCluster.Config.MasterConfig.Accelerators = append(r.Placement.ManagedCluster.Config.MasterConfig.Accelerators, rPlacementManagedClusterConfigMasterConfigAccelerators)
												}
											}
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.MasterConfig.Accelerators: expected []interface{}")
										}
									}
									if _, ok := rPlacementManagedClusterConfigMasterConfig["diskConfig"]; ok {
										if rPlacementManagedClusterConfigMasterConfigDiskConfig, ok := rPlacementManagedClusterConfigMasterConfig["diskConfig"].(map[string]interface{}); ok {
											r.Placement.ManagedCluster.Config.MasterConfig.DiskConfig = &dclService.WorkflowTemplatePlacementManagedClusterConfigMasterConfigDiskConfig{}
											if _, ok := rPlacementManagedClusterConfigMasterConfigDiskConfig["bootDiskSizeGb"]; ok {
												if i, ok := rPlacementManagedClusterConfigMasterConfigDiskConfig["bootDiskSizeGb"].(int64); ok {
													r.Placement.ManagedCluster.Config.MasterConfig.DiskConfig.BootDiskSizeGb = dcl.Int64(i)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.MasterConfig.DiskConfig.BootDiskSizeGb: expected int64")
												}
											}
											if _, ok := rPlacementManagedClusterConfigMasterConfigDiskConfig["bootDiskType"]; ok {
												if s, ok := rPlacementManagedClusterConfigMasterConfigDiskConfig["bootDiskType"].(string); ok {
													r.Placement.ManagedCluster.Config.MasterConfig.DiskConfig.BootDiskType = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.MasterConfig.DiskConfig.BootDiskType: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigMasterConfigDiskConfig["numLocalSsds"]; ok {
												if i, ok := rPlacementManagedClusterConfigMasterConfigDiskConfig["numLocalSsds"].(int64); ok {
													r.Placement.ManagedCluster.Config.MasterConfig.DiskConfig.NumLocalSsds = dcl.Int64(i)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.MasterConfig.DiskConfig.NumLocalSsds: expected int64")
												}
											}
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.MasterConfig.DiskConfig: expected map[string]interface{}")
										}
									}
									if _, ok := rPlacementManagedClusterConfigMasterConfig["image"]; ok {
										if s, ok := rPlacementManagedClusterConfigMasterConfig["image"].(string); ok {
											r.Placement.ManagedCluster.Config.MasterConfig.Image = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.MasterConfig.Image: expected string")
										}
									}
									if _, ok := rPlacementManagedClusterConfigMasterConfig["instanceNames"]; ok {
										if s, ok := rPlacementManagedClusterConfigMasterConfig["instanceNames"].([]interface{}); ok {
											for _, ss := range s {
												if strval, ok := ss.(string); ok {
													r.Placement.ManagedCluster.Config.MasterConfig.InstanceNames = append(r.Placement.ManagedCluster.Config.MasterConfig.InstanceNames, strval)
												}
											}
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.MasterConfig.InstanceNames: expected []interface{}")
										}
									}
									if _, ok := rPlacementManagedClusterConfigMasterConfig["isPreemptible"]; ok {
										if b, ok := rPlacementManagedClusterConfigMasterConfig["isPreemptible"].(bool); ok {
											r.Placement.ManagedCluster.Config.MasterConfig.IsPreemptible = dcl.Bool(b)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.MasterConfig.IsPreemptible: expected bool")
										}
									}
									if _, ok := rPlacementManagedClusterConfigMasterConfig["machineType"]; ok {
										if s, ok := rPlacementManagedClusterConfigMasterConfig["machineType"].(string); ok {
											r.Placement.ManagedCluster.Config.MasterConfig.MachineType = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.MasterConfig.MachineType: expected string")
										}
									}
									if _, ok := rPlacementManagedClusterConfigMasterConfig["managedGroupConfig"]; ok {
										if rPlacementManagedClusterConfigMasterConfigManagedGroupConfig, ok := rPlacementManagedClusterConfigMasterConfig["managedGroupConfig"].(map[string]interface{}); ok {
											r.Placement.ManagedCluster.Config.MasterConfig.ManagedGroupConfig = &dclService.WorkflowTemplatePlacementManagedClusterConfigMasterConfigManagedGroupConfig{}
											if _, ok := rPlacementManagedClusterConfigMasterConfigManagedGroupConfig["instanceGroupManagerName"]; ok {
												if s, ok := rPlacementManagedClusterConfigMasterConfigManagedGroupConfig["instanceGroupManagerName"].(string); ok {
													r.Placement.ManagedCluster.Config.MasterConfig.ManagedGroupConfig.InstanceGroupManagerName = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.MasterConfig.ManagedGroupConfig.InstanceGroupManagerName: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigMasterConfigManagedGroupConfig["instanceTemplateName"]; ok {
												if s, ok := rPlacementManagedClusterConfigMasterConfigManagedGroupConfig["instanceTemplateName"].(string); ok {
													r.Placement.ManagedCluster.Config.MasterConfig.ManagedGroupConfig.InstanceTemplateName = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.MasterConfig.ManagedGroupConfig.InstanceTemplateName: expected string")
												}
											}
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.MasterConfig.ManagedGroupConfig: expected map[string]interface{}")
										}
									}
									if _, ok := rPlacementManagedClusterConfigMasterConfig["minCpuPlatform"]; ok {
										if s, ok := rPlacementManagedClusterConfigMasterConfig["minCpuPlatform"].(string); ok {
											r.Placement.ManagedCluster.Config.MasterConfig.MinCpuPlatform = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.MasterConfig.MinCpuPlatform: expected string")
										}
									}
									if _, ok := rPlacementManagedClusterConfigMasterConfig["numInstances"]; ok {
										if i, ok := rPlacementManagedClusterConfigMasterConfig["numInstances"].(int64); ok {
											r.Placement.ManagedCluster.Config.MasterConfig.NumInstances = dcl.Int64(i)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.MasterConfig.NumInstances: expected int64")
										}
									}
									if _, ok := rPlacementManagedClusterConfigMasterConfig["preemptibility"]; ok {
										if s, ok := rPlacementManagedClusterConfigMasterConfig["preemptibility"].(string); ok {
											r.Placement.ManagedCluster.Config.MasterConfig.Preemptibility = dclService.WorkflowTemplatePlacementManagedClusterConfigMasterConfigPreemptibilityEnumRef(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.MasterConfig.Preemptibility: expected string")
										}
									}
								} else {
									return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.MasterConfig: expected map[string]interface{}")
								}
							}
							if _, ok := rPlacementManagedClusterConfig["metastoreConfig"]; ok {
								if rPlacementManagedClusterConfigMetastoreConfig, ok := rPlacementManagedClusterConfig["metastoreConfig"].(map[string]interface{}); ok {
									r.Placement.ManagedCluster.Config.MetastoreConfig = &dclService.WorkflowTemplatePlacementManagedClusterConfigMetastoreConfig{}
									if _, ok := rPlacementManagedClusterConfigMetastoreConfig["dataprocMetastoreService"]; ok {
										if s, ok := rPlacementManagedClusterConfigMetastoreConfig["dataprocMetastoreService"].(string); ok {
											r.Placement.ManagedCluster.Config.MetastoreConfig.DataprocMetastoreService = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.MetastoreConfig.DataprocMetastoreService: expected string")
										}
									}
								} else {
									return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.MetastoreConfig: expected map[string]interface{}")
								}
							}
							if _, ok := rPlacementManagedClusterConfig["secondaryWorkerConfig"]; ok {
								if rPlacementManagedClusterConfigSecondaryWorkerConfig, ok := rPlacementManagedClusterConfig["secondaryWorkerConfig"].(map[string]interface{}); ok {
									r.Placement.ManagedCluster.Config.SecondaryWorkerConfig = &dclService.WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfig{}
									if _, ok := rPlacementManagedClusterConfigSecondaryWorkerConfig["accelerators"]; ok {
										if s, ok := rPlacementManagedClusterConfigSecondaryWorkerConfig["accelerators"].([]interface{}); ok {
											for _, o := range s {
												if objval, ok := o.(map[string]interface{}); ok {
													var rPlacementManagedClusterConfigSecondaryWorkerConfigAccelerators dclService.WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigAccelerators
													if _, ok := objval["acceleratorCount"]; ok {
														if i, ok := objval["acceleratorCount"].(int64); ok {
															rPlacementManagedClusterConfigSecondaryWorkerConfigAccelerators.AcceleratorCount = dcl.Int64(i)
														} else {
															return nil, fmt.Errorf("rPlacementManagedClusterConfigSecondaryWorkerConfigAccelerators.AcceleratorCount: expected int64")
														}
													}
													if _, ok := objval["acceleratorType"]; ok {
														if s, ok := objval["acceleratorType"].(string); ok {
															rPlacementManagedClusterConfigSecondaryWorkerConfigAccelerators.AcceleratorType = dcl.String(s)
														} else {
															return nil, fmt.Errorf("rPlacementManagedClusterConfigSecondaryWorkerConfigAccelerators.AcceleratorType: expected string")
														}
													}
													r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.Accelerators = append(r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.Accelerators, rPlacementManagedClusterConfigSecondaryWorkerConfigAccelerators)
												}
											}
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.Accelerators: expected []interface{}")
										}
									}
									if _, ok := rPlacementManagedClusterConfigSecondaryWorkerConfig["diskConfig"]; ok {
										if rPlacementManagedClusterConfigSecondaryWorkerConfigDiskConfig, ok := rPlacementManagedClusterConfigSecondaryWorkerConfig["diskConfig"].(map[string]interface{}); ok {
											r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.DiskConfig = &dclService.WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigDiskConfig{}
											if _, ok := rPlacementManagedClusterConfigSecondaryWorkerConfigDiskConfig["bootDiskSizeGb"]; ok {
												if i, ok := rPlacementManagedClusterConfigSecondaryWorkerConfigDiskConfig["bootDiskSizeGb"].(int64); ok {
													r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.DiskConfig.BootDiskSizeGb = dcl.Int64(i)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.DiskConfig.BootDiskSizeGb: expected int64")
												}
											}
											if _, ok := rPlacementManagedClusterConfigSecondaryWorkerConfigDiskConfig["bootDiskType"]; ok {
												if s, ok := rPlacementManagedClusterConfigSecondaryWorkerConfigDiskConfig["bootDiskType"].(string); ok {
													r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.DiskConfig.BootDiskType = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.DiskConfig.BootDiskType: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigSecondaryWorkerConfigDiskConfig["numLocalSsds"]; ok {
												if i, ok := rPlacementManagedClusterConfigSecondaryWorkerConfigDiskConfig["numLocalSsds"].(int64); ok {
													r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.DiskConfig.NumLocalSsds = dcl.Int64(i)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.DiskConfig.NumLocalSsds: expected int64")
												}
											}
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.DiskConfig: expected map[string]interface{}")
										}
									}
									if _, ok := rPlacementManagedClusterConfigSecondaryWorkerConfig["image"]; ok {
										if s, ok := rPlacementManagedClusterConfigSecondaryWorkerConfig["image"].(string); ok {
											r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.Image = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.Image: expected string")
										}
									}
									if _, ok := rPlacementManagedClusterConfigSecondaryWorkerConfig["instanceNames"]; ok {
										if s, ok := rPlacementManagedClusterConfigSecondaryWorkerConfig["instanceNames"].([]interface{}); ok {
											for _, ss := range s {
												if strval, ok := ss.(string); ok {
													r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.InstanceNames = append(r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.InstanceNames, strval)
												}
											}
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.InstanceNames: expected []interface{}")
										}
									}
									if _, ok := rPlacementManagedClusterConfigSecondaryWorkerConfig["isPreemptible"]; ok {
										if b, ok := rPlacementManagedClusterConfigSecondaryWorkerConfig["isPreemptible"].(bool); ok {
											r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.IsPreemptible = dcl.Bool(b)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.IsPreemptible: expected bool")
										}
									}
									if _, ok := rPlacementManagedClusterConfigSecondaryWorkerConfig["machineType"]; ok {
										if s, ok := rPlacementManagedClusterConfigSecondaryWorkerConfig["machineType"].(string); ok {
											r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.MachineType = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.MachineType: expected string")
										}
									}
									if _, ok := rPlacementManagedClusterConfigSecondaryWorkerConfig["managedGroupConfig"]; ok {
										if rPlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig, ok := rPlacementManagedClusterConfigSecondaryWorkerConfig["managedGroupConfig"].(map[string]interface{}); ok {
											r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.ManagedGroupConfig = &dclService.WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig{}
											if _, ok := rPlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig["instanceGroupManagerName"]; ok {
												if s, ok := rPlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig["instanceGroupManagerName"].(string); ok {
													r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.ManagedGroupConfig.InstanceGroupManagerName = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.ManagedGroupConfig.InstanceGroupManagerName: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig["instanceTemplateName"]; ok {
												if s, ok := rPlacementManagedClusterConfigSecondaryWorkerConfigManagedGroupConfig["instanceTemplateName"].(string); ok {
													r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.ManagedGroupConfig.InstanceTemplateName = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.ManagedGroupConfig.InstanceTemplateName: expected string")
												}
											}
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.ManagedGroupConfig: expected map[string]interface{}")
										}
									}
									if _, ok := rPlacementManagedClusterConfigSecondaryWorkerConfig["minCpuPlatform"]; ok {
										if s, ok := rPlacementManagedClusterConfigSecondaryWorkerConfig["minCpuPlatform"].(string); ok {
											r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.MinCpuPlatform = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.MinCpuPlatform: expected string")
										}
									}
									if _, ok := rPlacementManagedClusterConfigSecondaryWorkerConfig["numInstances"]; ok {
										if i, ok := rPlacementManagedClusterConfigSecondaryWorkerConfig["numInstances"].(int64); ok {
											r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.NumInstances = dcl.Int64(i)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.NumInstances: expected int64")
										}
									}
									if _, ok := rPlacementManagedClusterConfigSecondaryWorkerConfig["preemptibility"]; ok {
										if s, ok := rPlacementManagedClusterConfigSecondaryWorkerConfig["preemptibility"].(string); ok {
											r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.Preemptibility = dclService.WorkflowTemplatePlacementManagedClusterConfigSecondaryWorkerConfigPreemptibilityEnumRef(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecondaryWorkerConfig.Preemptibility: expected string")
										}
									}
								} else {
									return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecondaryWorkerConfig: expected map[string]interface{}")
								}
							}
							if _, ok := rPlacementManagedClusterConfig["securityConfig"]; ok {
								if rPlacementManagedClusterConfigSecurityConfig, ok := rPlacementManagedClusterConfig["securityConfig"].(map[string]interface{}); ok {
									r.Placement.ManagedCluster.Config.SecurityConfig = &dclService.WorkflowTemplatePlacementManagedClusterConfigSecurityConfig{}
									if _, ok := rPlacementManagedClusterConfigSecurityConfig["kerberosConfig"]; ok {
										if rPlacementManagedClusterConfigSecurityConfigKerberosConfig, ok := rPlacementManagedClusterConfigSecurityConfig["kerberosConfig"].(map[string]interface{}); ok {
											r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig = &dclService.WorkflowTemplatePlacementManagedClusterConfigSecurityConfigKerberosConfig{}
											if _, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["crossRealmTrustAdminServer"]; ok {
												if s, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["crossRealmTrustAdminServer"].(string); ok {
													r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.CrossRealmTrustAdminServer = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.CrossRealmTrustAdminServer: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["crossRealmTrustKdc"]; ok {
												if s, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["crossRealmTrustKdc"].(string); ok {
													r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.CrossRealmTrustKdc = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.CrossRealmTrustKdc: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["crossRealmTrustRealm"]; ok {
												if s, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["crossRealmTrustRealm"].(string); ok {
													r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.CrossRealmTrustRealm = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.CrossRealmTrustRealm: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["crossRealmTrustSharedPassword"]; ok {
												if s, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["crossRealmTrustSharedPassword"].(string); ok {
													r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.CrossRealmTrustSharedPassword = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.CrossRealmTrustSharedPassword: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["enableKerberos"]; ok {
												if b, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["enableKerberos"].(bool); ok {
													r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.EnableKerberos = dcl.Bool(b)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.EnableKerberos: expected bool")
												}
											}
											if _, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["kdcDbKey"]; ok {
												if s, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["kdcDbKey"].(string); ok {
													r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.KdcDbKey = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.KdcDbKey: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["keyPassword"]; ok {
												if s, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["keyPassword"].(string); ok {
													r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.KeyPassword = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.KeyPassword: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["keystore"]; ok {
												if s, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["keystore"].(string); ok {
													r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.Keystore = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.Keystore: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["keystorePassword"]; ok {
												if s, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["keystorePassword"].(string); ok {
													r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.KeystorePassword = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.KeystorePassword: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["kmsKey"]; ok {
												if s, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["kmsKey"].(string); ok {
													r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.KmsKey = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.KmsKey: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["realm"]; ok {
												if s, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["realm"].(string); ok {
													r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.Realm = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.Realm: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["rootPrincipalPassword"]; ok {
												if s, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["rootPrincipalPassword"].(string); ok {
													r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.RootPrincipalPassword = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.RootPrincipalPassword: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["tgtLifetimeHours"]; ok {
												if i, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["tgtLifetimeHours"].(int64); ok {
													r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.TgtLifetimeHours = dcl.Int64(i)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.TgtLifetimeHours: expected int64")
												}
											}
											if _, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["truststore"]; ok {
												if s, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["truststore"].(string); ok {
													r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.Truststore = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.Truststore: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["truststorePassword"]; ok {
												if s, ok := rPlacementManagedClusterConfigSecurityConfigKerberosConfig["truststorePassword"].(string); ok {
													r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.TruststorePassword = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig.TruststorePassword: expected string")
												}
											}
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecurityConfig.KerberosConfig: expected map[string]interface{}")
										}
									}
								} else {
									return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SecurityConfig: expected map[string]interface{}")
								}
							}
							if _, ok := rPlacementManagedClusterConfig["softwareConfig"]; ok {
								if rPlacementManagedClusterConfigSoftwareConfig, ok := rPlacementManagedClusterConfig["softwareConfig"].(map[string]interface{}); ok {
									r.Placement.ManagedCluster.Config.SoftwareConfig = &dclService.WorkflowTemplatePlacementManagedClusterConfigSoftwareConfig{}
									if _, ok := rPlacementManagedClusterConfigSoftwareConfig["imageVersion"]; ok {
										if s, ok := rPlacementManagedClusterConfigSoftwareConfig["imageVersion"].(string); ok {
											r.Placement.ManagedCluster.Config.SoftwareConfig.ImageVersion = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SoftwareConfig.ImageVersion: expected string")
										}
									}
									if _, ok := rPlacementManagedClusterConfigSoftwareConfig["optionalComponents"]; ok {
										if s, ok := rPlacementManagedClusterConfigSoftwareConfig["optionalComponents"].([]interface{}); ok {
											for _, ss := range s {
												if strval, ok := ss.(string); ok {
													r.Placement.ManagedCluster.Config.SoftwareConfig.OptionalComponents = append(r.Placement.ManagedCluster.Config.SoftwareConfig.OptionalComponents, dclService.WorkflowTemplatePlacementManagedClusterConfigSoftwareConfigOptionalComponentsEnum(strval))
												}
											}
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SoftwareConfig.OptionalComponents: expected []interface{}")
										}
									}
									if _, ok := rPlacementManagedClusterConfigSoftwareConfig["properties"]; ok {
										if rPlacementManagedClusterConfigSoftwareConfigProperties, ok := rPlacementManagedClusterConfigSoftwareConfig["properties"].(map[string]interface{}); ok {
											m := make(map[string]string)
											for k, v := range rPlacementManagedClusterConfigSoftwareConfigProperties {
												if s, ok := v.(string); ok {
													m[k] = s
												}
											}
											r.Placement.ManagedCluster.Config.SoftwareConfig.Properties = m
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SoftwareConfig.Properties: expected map[string]interface{}")
										}
									}
								} else {
									return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.SoftwareConfig: expected map[string]interface{}")
								}
							}
							if _, ok := rPlacementManagedClusterConfig["stagingBucket"]; ok {
								if s, ok := rPlacementManagedClusterConfig["stagingBucket"].(string); ok {
									r.Placement.ManagedCluster.Config.StagingBucket = dcl.String(s)
								} else {
									return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.StagingBucket: expected string")
								}
							}
							if _, ok := rPlacementManagedClusterConfig["tempBucket"]; ok {
								if s, ok := rPlacementManagedClusterConfig["tempBucket"].(string); ok {
									r.Placement.ManagedCluster.Config.TempBucket = dcl.String(s)
								} else {
									return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.TempBucket: expected string")
								}
							}
							if _, ok := rPlacementManagedClusterConfig["workerConfig"]; ok {
								if rPlacementManagedClusterConfigWorkerConfig, ok := rPlacementManagedClusterConfig["workerConfig"].(map[string]interface{}); ok {
									r.Placement.ManagedCluster.Config.WorkerConfig = &dclService.WorkflowTemplatePlacementManagedClusterConfigWorkerConfig{}
									if _, ok := rPlacementManagedClusterConfigWorkerConfig["accelerators"]; ok {
										if s, ok := rPlacementManagedClusterConfigWorkerConfig["accelerators"].([]interface{}); ok {
											for _, o := range s {
												if objval, ok := o.(map[string]interface{}); ok {
													var rPlacementManagedClusterConfigWorkerConfigAccelerators dclService.WorkflowTemplatePlacementManagedClusterConfigWorkerConfigAccelerators
													if _, ok := objval["acceleratorCount"]; ok {
														if i, ok := objval["acceleratorCount"].(int64); ok {
															rPlacementManagedClusterConfigWorkerConfigAccelerators.AcceleratorCount = dcl.Int64(i)
														} else {
															return nil, fmt.Errorf("rPlacementManagedClusterConfigWorkerConfigAccelerators.AcceleratorCount: expected int64")
														}
													}
													if _, ok := objval["acceleratorType"]; ok {
														if s, ok := objval["acceleratorType"].(string); ok {
															rPlacementManagedClusterConfigWorkerConfigAccelerators.AcceleratorType = dcl.String(s)
														} else {
															return nil, fmt.Errorf("rPlacementManagedClusterConfigWorkerConfigAccelerators.AcceleratorType: expected string")
														}
													}
													r.Placement.ManagedCluster.Config.WorkerConfig.Accelerators = append(r.Placement.ManagedCluster.Config.WorkerConfig.Accelerators, rPlacementManagedClusterConfigWorkerConfigAccelerators)
												}
											}
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.WorkerConfig.Accelerators: expected []interface{}")
										}
									}
									if _, ok := rPlacementManagedClusterConfigWorkerConfig["diskConfig"]; ok {
										if rPlacementManagedClusterConfigWorkerConfigDiskConfig, ok := rPlacementManagedClusterConfigWorkerConfig["diskConfig"].(map[string]interface{}); ok {
											r.Placement.ManagedCluster.Config.WorkerConfig.DiskConfig = &dclService.WorkflowTemplatePlacementManagedClusterConfigWorkerConfigDiskConfig{}
											if _, ok := rPlacementManagedClusterConfigWorkerConfigDiskConfig["bootDiskSizeGb"]; ok {
												if i, ok := rPlacementManagedClusterConfigWorkerConfigDiskConfig["bootDiskSizeGb"].(int64); ok {
													r.Placement.ManagedCluster.Config.WorkerConfig.DiskConfig.BootDiskSizeGb = dcl.Int64(i)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.WorkerConfig.DiskConfig.BootDiskSizeGb: expected int64")
												}
											}
											if _, ok := rPlacementManagedClusterConfigWorkerConfigDiskConfig["bootDiskType"]; ok {
												if s, ok := rPlacementManagedClusterConfigWorkerConfigDiskConfig["bootDiskType"].(string); ok {
													r.Placement.ManagedCluster.Config.WorkerConfig.DiskConfig.BootDiskType = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.WorkerConfig.DiskConfig.BootDiskType: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigWorkerConfigDiskConfig["numLocalSsds"]; ok {
												if i, ok := rPlacementManagedClusterConfigWorkerConfigDiskConfig["numLocalSsds"].(int64); ok {
													r.Placement.ManagedCluster.Config.WorkerConfig.DiskConfig.NumLocalSsds = dcl.Int64(i)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.WorkerConfig.DiskConfig.NumLocalSsds: expected int64")
												}
											}
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.WorkerConfig.DiskConfig: expected map[string]interface{}")
										}
									}
									if _, ok := rPlacementManagedClusterConfigWorkerConfig["image"]; ok {
										if s, ok := rPlacementManagedClusterConfigWorkerConfig["image"].(string); ok {
											r.Placement.ManagedCluster.Config.WorkerConfig.Image = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.WorkerConfig.Image: expected string")
										}
									}
									if _, ok := rPlacementManagedClusterConfigWorkerConfig["instanceNames"]; ok {
										if s, ok := rPlacementManagedClusterConfigWorkerConfig["instanceNames"].([]interface{}); ok {
											for _, ss := range s {
												if strval, ok := ss.(string); ok {
													r.Placement.ManagedCluster.Config.WorkerConfig.InstanceNames = append(r.Placement.ManagedCluster.Config.WorkerConfig.InstanceNames, strval)
												}
											}
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.WorkerConfig.InstanceNames: expected []interface{}")
										}
									}
									if _, ok := rPlacementManagedClusterConfigWorkerConfig["isPreemptible"]; ok {
										if b, ok := rPlacementManagedClusterConfigWorkerConfig["isPreemptible"].(bool); ok {
											r.Placement.ManagedCluster.Config.WorkerConfig.IsPreemptible = dcl.Bool(b)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.WorkerConfig.IsPreemptible: expected bool")
										}
									}
									if _, ok := rPlacementManagedClusterConfigWorkerConfig["machineType"]; ok {
										if s, ok := rPlacementManagedClusterConfigWorkerConfig["machineType"].(string); ok {
											r.Placement.ManagedCluster.Config.WorkerConfig.MachineType = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.WorkerConfig.MachineType: expected string")
										}
									}
									if _, ok := rPlacementManagedClusterConfigWorkerConfig["managedGroupConfig"]; ok {
										if rPlacementManagedClusterConfigWorkerConfigManagedGroupConfig, ok := rPlacementManagedClusterConfigWorkerConfig["managedGroupConfig"].(map[string]interface{}); ok {
											r.Placement.ManagedCluster.Config.WorkerConfig.ManagedGroupConfig = &dclService.WorkflowTemplatePlacementManagedClusterConfigWorkerConfigManagedGroupConfig{}
											if _, ok := rPlacementManagedClusterConfigWorkerConfigManagedGroupConfig["instanceGroupManagerName"]; ok {
												if s, ok := rPlacementManagedClusterConfigWorkerConfigManagedGroupConfig["instanceGroupManagerName"].(string); ok {
													r.Placement.ManagedCluster.Config.WorkerConfig.ManagedGroupConfig.InstanceGroupManagerName = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.WorkerConfig.ManagedGroupConfig.InstanceGroupManagerName: expected string")
												}
											}
											if _, ok := rPlacementManagedClusterConfigWorkerConfigManagedGroupConfig["instanceTemplateName"]; ok {
												if s, ok := rPlacementManagedClusterConfigWorkerConfigManagedGroupConfig["instanceTemplateName"].(string); ok {
													r.Placement.ManagedCluster.Config.WorkerConfig.ManagedGroupConfig.InstanceTemplateName = dcl.String(s)
												} else {
													return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.WorkerConfig.ManagedGroupConfig.InstanceTemplateName: expected string")
												}
											}
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.WorkerConfig.ManagedGroupConfig: expected map[string]interface{}")
										}
									}
									if _, ok := rPlacementManagedClusterConfigWorkerConfig["minCpuPlatform"]; ok {
										if s, ok := rPlacementManagedClusterConfigWorkerConfig["minCpuPlatform"].(string); ok {
											r.Placement.ManagedCluster.Config.WorkerConfig.MinCpuPlatform = dcl.String(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.WorkerConfig.MinCpuPlatform: expected string")
										}
									}
									if _, ok := rPlacementManagedClusterConfigWorkerConfig["numInstances"]; ok {
										if i, ok := rPlacementManagedClusterConfigWorkerConfig["numInstances"].(int64); ok {
											r.Placement.ManagedCluster.Config.WorkerConfig.NumInstances = dcl.Int64(i)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.WorkerConfig.NumInstances: expected int64")
										}
									}
									if _, ok := rPlacementManagedClusterConfigWorkerConfig["preemptibility"]; ok {
										if s, ok := rPlacementManagedClusterConfigWorkerConfig["preemptibility"].(string); ok {
											r.Placement.ManagedCluster.Config.WorkerConfig.Preemptibility = dclService.WorkflowTemplatePlacementManagedClusterConfigWorkerConfigPreemptibilityEnumRef(s)
										} else {
											return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.WorkerConfig.Preemptibility: expected string")
										}
									}
								} else {
									return nil, fmt.Errorf("r.Placement.ManagedCluster.Config.WorkerConfig: expected map[string]interface{}")
								}
							}
						} else {
							return nil, fmt.Errorf("r.Placement.ManagedCluster.Config: expected map[string]interface{}")
						}
					}
					if _, ok := rPlacementManagedCluster["labels"]; ok {
						if rPlacementManagedClusterLabels, ok := rPlacementManagedCluster["labels"].(map[string]interface{}); ok {
							m := make(map[string]string)
							for k, v := range rPlacementManagedClusterLabels {
								if s, ok := v.(string); ok {
									m[k] = s
								}
							}
							r.Placement.ManagedCluster.Labels = m
						} else {
							return nil, fmt.Errorf("r.Placement.ManagedCluster.Labels: expected map[string]interface{}")
						}
					}
				} else {
					return nil, fmt.Errorf("r.Placement.ManagedCluster: expected map[string]interface{}")
				}
			}
		} else {
			return nil, fmt.Errorf("r.Placement: expected map[string]interface{}")
		}
	}
	if _, ok := u.Object["project"]; ok {
		if s, ok := u.Object["project"].(string); ok {
			r.Project = dcl.String(s)
		} else {
			return nil, fmt.Errorf("r.Project: expected string")
		}
	}
	if _, ok := u.Object["updateTime"]; ok {
		if s, ok := u.Object["updateTime"].(string); ok {
			r.UpdateTime = dcl.String(s)
		} else {
			return nil, fmt.Errorf("r.UpdateTime: expected string")
		}
	}
	if _, ok := u.Object["version"]; ok {
		if i, ok := u.Object["version"].(int64); ok {
			r.Version = dcl.Int64(i)
		} else {
			return nil, fmt.Errorf("r.Version: expected int64")
		}
	}
	return r, nil
}