func fillIcmpFields(d *schema.ResourceData, aclRule *cloudca.NetworkAclRule) { if v, ok := d.GetOk("icmp_type"); ok { aclRule.IcmpType = strconv.Itoa(v.(int)) } if v, ok := d.GetOk("icmp_code"); ok { aclRule.IcmpCode = strconv.Itoa(v.(int)) } }
func fillPortFields(d *schema.ResourceData, aclRule *cloudca.NetworkAclRule) { if v, ok := d.GetOk("start_port"); ok { aclRule.StartPort = strconv.Itoa(v.(int)) } if v, ok := d.GetOk("end_port"); ok { aclRule.EndPort = strconv.Itoa(v.(int)) } }